]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
closes bpo-36188: Clean up 'unbound' method left-overs. (GH-12169)
authorMartijn Pieters <github.com@zopatista.com>
Tue, 5 Mar 2019 05:19:34 +0000 (05:19 +0000)
committerBenjamin Peterson <benjamin@python.org>
Tue, 5 Mar 2019 05:19:34 +0000 (21:19 -0800)
commitb727239575894b060db37792e86aab818c00817a
tree2da2cd225bbae5d92ccb9dee48afbb842dc9640d
parent0983fcd0d5bd00c6b0dd3040760226f67aa831cd
closes bpo-36188: Clean up 'unbound' method left-overs. (GH-12169)

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.
Doc/reference/datamodel.rst
Misc/NEWS.d/next/Core and Builtins/2019-03-04-18-05-31.bpo-36188.EuUZNz.rst [new file with mode: 0644]
Objects/classobject.c