Creating user-defined method objects
suggest changeA user-defined method object is created when a user-defined function is retrieved from a class through an instance of that class. The method is bound to that instance. Retrieving the same function from the class returns the function itself. Python 3 has no unbound method object.
A classmethod object produces a method bound to the class, whether it is retrieved from the class or from an instance. The older rule, that a new method was created only when the class was the original method’s class or a subclass of it, belonged to unbound methods and does not apply here.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents