Skip to content

bpo-36188: Clean up 'unbound' method left-overs #12169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 5, 2019

Conversation

mjpieters
Copy link
Contributor

@mjpieters mjpieters commented Mar 4, 2019

Methods are always bound, and __self__ can no longer be NULL
(method_new() and PyMethod_New() both explicitly check for this).

Moreover, once a bound method is bound, it stays bound and won't be re-bound
to something else, so the section in the datamodel that talks about accessing
methods in a different descriptor-binding context doesn't apply any more in
Python 3.

https://bugs.python.org/issue36188

Methods are always bound, and `__self__` can no longer be `NULL`
(`method_new()` and `PyMethod_New()` both explicitly check for this).

Moreover, once a bound method is bound, it *stays* bound and won't be re-bound
to something else, so the section in the datamodel that talks about accessing
an methods in a different descriptor-binding context doesn't apply any more in
Python 3.
@mjpieters mjpieters changed the title Clean up 'unbound' method left-overs bpo-12169: Clean up 'unbound' method left-overs Mar 4, 2019
@mjpieters mjpieters changed the title bpo-12169: Clean up 'unbound' method left-overs bpo-36188: Clean up 'unbound' method left-overs Mar 4, 2019
@benjaminp benjaminp merged commit b727239 into python:master Mar 5, 2019
@benjaminp
Copy link
Contributor

Nice, thanks!

@mjpieters mjpieters deleted the cleanup_method__get__ branch June 12, 2019 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants