[issue20309] Not all descriptors are callable

Armin Rigo report at bugs.python.org
Mon Jan 20 10:41:54 CET 2014


Armin Rigo added the comment:

Instances of 'staticmethod' or 'classmethod' are not callable.  I'm unsure why not, but it's good enough, as you need to go through various unexpected hops in order to try to call one.

'dict.fromkeys' is not a classmethod, as seen by "dict.__dict__['fromkeys']".  It's an internal object usually never seen by Python code.  I believe this is only because implementing a regular classmethod in C would be rather messy.

----------

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


More information about the Python-bugs-list mailing list