[issue20308] inspect.Signature doesn't support user classes without __init__ or __new__

Yury Selivanov report at bugs.python.org
Mon Jan 20 00:32:07 CET 2014


Yury Selivanov added the comment:

Please take a look at the attached patch (signature_plain_cls_01.patch)

Now, the patch addresses two kind of classes:

class C: pass
and 
class C(type): pass

For metaclasses, signature will return a signature with three positional-only parameters - (name, bases, dct). [let's discuss this]

The patch doesn't address 'object' or 'type' objects directly, though, so 'signature(object)' and 'signature(type)' are still a ValueError.

----------
keywords: +patch
Added file: http://bugs.python.org/file33556/signature_plain_cls_01.patch

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


More information about the Python-bugs-list mailing list