Skip to content

Conversation

@atombrella
Copy link
Contributor

I replaced this pattern in SSLSocket. It's all over the place in the codebase. I don't know if it merits a single ticket for each area, or just the whole code-base.

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please open an issue on the bug tracker for discussion. Or even two issues, because different modules have different maintainers, and the changes should be reviewed and merged separately.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@methane
Copy link
Member

methane commented Mar 27, 2018

This PR is linked from bpo-31853.

Copy link
Member

@tiran tiran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't recycle an unrelated and already closed ticket

@rhettinger
Copy link
Contributor

Atombrella, I think you're proceeding under that false assumption that using super() if always or often better than direct parent class references. Python's super() is complicated (and not very fast). It would be easy to accidentally introduce behavior changes.

Another consideration is that the effects of such changes are hard-to-test because the MRO is controlled by subclasses. That means that in general we cannot know for sure where super() is going to forward it call (because it was designed to support cooperative multiple inheritance).

In general, changes from direct parent class references to super() should only be done if there is a known use case and if the current maintainer of a module agrees to the change.

@atombrella
Copy link
Contributor Author

OK. Since the ticket has been marked as "not as a bug", I'll close my close my pull request. Thanks for the detailed descriptions.

@atombrella atombrella closed this Jul 11, 2018
@atombrella atombrella deleted the super_calls branch July 11, 2018 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment