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 terry.reedy
Date 2013-12-06.00:21:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Change idlelib.CallTips.get_argspec to use inspect.signature, new in 3.3, instead of inspect.getfullargspec and inspect.formatargspec. One thing it handles better is a namedtuple class, which has a C-coded __init__ inherited from object a Python-coded __new__ written by namedtuple. Signature() will also handle C-coded functions if and when Argument Clinic (new in 3.4) adds signature information.

from collections import namedtuple
from inspect import signature

Point = namedtuple('Point', 'x y')
# '(_cls, x, y)'
# '(x, y)'

Note that str (called by print) is needed to get the desired string form.

There are tests in, but they should be converted to unittest, moved to idle_test/, changed to match new output detail, and expanded to include new examples.
Date User Action Args
2013-12-06 00:21:46terry.reedysetrecipients: + terry.reedy
2013-12-06 00:21:46terry.reedysetmessageid: <>
2013-12-06 00:21:46terry.reedylinkissue19903 messages
2013-12-06 00:21:45terry.reedycreate