[issue29117] dir(<bound method>) should include dunder attributes of the unbound method

Terry J. Reedy report at bugs.python.org
Fri Jan 6 16:51:15 EST 2017


Terry J. Reedy added the comment:

I tested your last claim and it is true as far as I went.

>>> C.f.__annotations__
{'a': <class 'int'>}
>>> C().f.__annotations__
{'a': <class 'int'>}
>>> C.f.__code__
<code object f at 0x000002610BDB5150, file "<pyshell#7>", line 2>
>>> C().f.__code__
<code object f at 0x000002610BDB5150, file "<pyshell#7>", line 2>

----------
nosy: +terry.reedy
stage:  -> test needed
type:  -> behavior
versions: +Python 3.6, Python 3.7 -Python 3.5

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


More information about the Python-bugs-list mailing list