This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients Arfrever, arigo, barry, chrish42, eryksun, larry, ncoghlan, pitrou, r.david.murray
Date 2014-04-17.08:44:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
classmethod_descriptor instances such as vars(dict)['fromkeys'] are callable. The first argument has to be a subclass of __objclass__:

    >>> vars(dict)['fromkeys'].__objclass__
    <class 'dict'>

Calling the descriptor creates a bound built-in method; slices the args to remove the class; and calls it with the args and kwds.

    >>> vars(dict)['fromkeys'](dict, 'abc')
    {'a': None, 'b': None, 'c': None}

source: classmethoddescr_call

While the classmethod and staticmethod types that are defined in funcobject.c aren't callable, they do expose a __func__ member.
Date User Action Args
2014-04-17 08:44:47eryksunsetrecipients: + eryksun, barry, arigo, ncoghlan, pitrou, chrish42, larry, Arfrever, r.david.murray
2014-04-17 08:44:47eryksunsetmessageid: <>
2014-04-17 08:44:47eryksunlinkissue20309 messages
2014-04-17 08:44:46eryksuncreate