Skip to content

Conversation

@mjpieters
Copy link
Contributor

@mjpietersmjpieters 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.
@mjpietersmjpieters changed the title Clean up 'unbound' method left-oversbpo-12169: Clean up 'unbound' method left-oversMar 4, 2019
@mjpietersmjpieters changed the title bpo-12169: Clean up 'unbound' method left-oversbpo-36188: Clean up 'unbound' method left-oversMar 4, 2019
@benjaminpbenjaminp merged commit b727239 into python:masterMar 5, 2019
@benjaminp
Copy link
Contributor

Nice, thanks!

@mjpietersmjpieters deleted the cleanup_method__get__ branch June 12, 2019 14:27
Sign up for freeto 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

@mjpieters@benjaminp@the-knights-who-say-ni@bedevere-bot