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 terry.reedy
Recipients Ankur.Ankan, eric.snow, giampaolo.rodola, gvanrossum, pconnell, rhettinger, serhiy.storchaka, terry.reedy
Date 2013-12-06.00:27:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1386289652.97.0.523505500986.issue16669@psf.upfronthosting.co.za>
In-reply-to
Content
I think we can now agree that docstrings other than the class docstring (used as a fallback) are not relevant to signature detection. And Raymond gave namedtuple classes the docstring needed as a fallback.

We are off-issue here, but idlelib.CallTips.get_argspec() is also ignorant that it may need to look at  .__new__. An object with a C-coded .__init__ and Python-coded .__new__ is new to new-style classes. The new inspect.signature function handles such properly. Starting with a namedtuple Point (without the default docstring):

>>> from inspect import signature
>>> str(signature(Point.__new__))
'(_cls, x, y)'
>>> str(signature(Point))
'(x, y)'

The second is what autodoc should use. I just opened #19903 to update Idle to use signature.
History
Date User Action Args
2013-12-06 00:27:33terry.reedysetrecipients: + terry.reedy, gvanrossum, rhettinger, giampaolo.rodola, eric.snow, serhiy.storchaka, pconnell, Ankur.Ankan
2013-12-06 00:27:32terry.reedysetmessageid: <1386289652.97.0.523505500986.issue16669@psf.upfronthosting.co.za>
2013-12-06 00:27:32terry.reedylinkissue16669 messages
2013-12-06 00:27:32terry.reedycreate