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 <rep...@bugs.python.org>
<http://bugs.python.org/issue20308>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to