Creating user-defined method objects

suggest change

A 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.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents