[issue17008] Descriptor __get__() invoke is bypassed in the class context

Benjamin Peterson report at bugs.python.org
Mon Jan 21 20:06:18 CET 2013


Benjamin Peterson added the comment:

If you want to emulate classmethod, calling __get__() on the function is the wrong thing to do. f.__get__(None, X) -> f You need to create a bound yourself instead.

----------
nosy: +benjamin.peterson
resolution:  -> invalid
status: open -> closed

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


More information about the Python-bugs-list mailing list