summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorMartijn Pieters <github.com@zopatista.com>2019-03-05 05:19:34 (GMT)
committerBenjamin Peterson <benjamin@python.org>2019-03-05 05:19:34 (GMT)
commitb727239575894b060db37792e86aab818c00817a (patch)
tree2da2cd225bbae5d92ccb9dee48afbb842dc9640d /Doc/reference
parent0983fcd0d5bd00c6b0dd3040760226f67aa831cd (diff)
downloadcpython-b727239575894b060db37792e86aab818c00817a.zip
cpython-b727239575894b060db37792e86aab818c00817a.tar.gz
cpython-b727239575894b060db37792e86aab818c00817a.tar.bz2
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.
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/datamodel.rst6
1 files changed, 0 insertions, 6 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 9422ae6..c3e79ce 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -578,12 +578,6 @@ Callable types
to be bound. The new method's :attr:`__func__` attribute is the original
function object.
- When a user-defined method object is created by retrieving another method
- object from a class or instance, the behaviour is the same as for a
- function object, except that the :attr:`__func__` attribute of the new
- instance is not the original method object but its :attr:`__func__`
- attribute.
-
When an instance method object is created by retrieving a class method
object from a class or instance, its :attr:`__self__` attribute is the
class itself, and its :attr:`__func__` attribute is the function object