[docs] [issue29032] How does the __self__ attribute of method become a class rather a instance?

woo yoo report at bugs.python.org
Wed Dec 21 04:08:52 EST 2016


New submission from woo yoo:

The documentation of instance methods confused me, it classifies methods into two types:the one is retrieved by an instance of a class, the other is created by retrieving a method from a class or instance.

According to the description,

>When an instance method object is created by retrieving a class method >object from a class or instance, its __self__ attribute is the class >itself, and its __func__ attribute is the function object underlying the >class method.

the  __self__ attribute of the more complex methods is a class. How does this happen? Is this description incorrect?

----------
assignee: docs at python
components: Documentation
messages: 283724
nosy: docs at python, woo yoo
priority: normal
severity: normal
status: open
title: How does the __self__ attribute of method become a class rather a instance?
type: behavior
versions: Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29032>
_______________________________________


More information about the docs mailing list