]> granicus.if.org Git - python/commit
bpo-19903: IDLE: Calltips changed to use inspect.signature (#2822)
authorLouie Lu <git@louie.lu>
Thu, 10 Aug 2017 00:58:13 +0000 (08:58 +0800)
committerTerry Jan Reedy <tjreedy@udel.edu>
Thu, 10 Aug 2017 00:58:13 +0000 (20:58 -0400)
commit3b0f620c1a2a21272a9e2aeca6ca1d1ac10f8162
treeed0b81d4643ce3f589307b23fefe70052f2d629f
parent3ca9f50f96cfa5c1b7aa56639042531b57f07fbb
bpo-19903: IDLE: Calltips changed to use inspect.signature (#2822)

Idlelib.calltips.get_argspec now uses inspect.signature instead of inspect.getfullargspec, like help() does.  This improves the signature in the call tip in a few different cases, including builtins converted to provide a signature.  A message is added if the object is not callable, has an invalid signature, or if it has positional-only parameters.
Patch by Louie Lu.
Lib/idlelib/calltips.py
Lib/idlelib/idle_test/test_calltips.py
Misc/NEWS.d/next/IDLE/2017-08-03-14-08-42.bpo-19903.sqE1FS.rst [new file with mode: 0644]