[issue20308] inspect.Signature doesn't support user classes without __init__ or __new__
Larry Hastings
report at bugs.python.org
Sun Jan 19 23:42:53 CET 2014
Larry Hastings added the comment:
__new__ and __init__ methods are very special. They can't have signatures, because the mechanism we use to store the signatures won't work. (We hide them as a special first line of the docstring, and __new__ and __init__ can't have custom docstrings.)
In my next patch for #20189,
inspect.signature(object)
will return a valid signature object. But
class C: pass
inspect.signature(C)
still fails in that branch.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20308>
_______________________________________
More information about the Python-bugs-list
mailing list