Steven D'Aprano added the comment:

Be careful with the documentation patch. Although unbound method as an object 
type is gone, unbound method as a concept is not.

Conceptually, something like ``MyClass.spam`` is an unbound method: it is a 
method of the MyClass type, but bound to no instance. In Python 2 that concept 
was implemented by MethodType. In Python 3, the concept is implemented by 
FunctionType.

While it is certainly true from one perspective that unbound methods are 
nothing but functions, it is nevertheless also sometimes useful to distinguish 
from "functions defined in a class" (methods) and "other functions". I think 
that nearly all Python programmers would be happy to call ``spam`` below:

    class MyClass:
        def spam(self, arg): ...

a method, even though it is also/really a function.

----------
nosy: +steven.daprano

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23702>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to