◐ Shell
clean mode source ↗

bpo-19903: IDLE: Calltips changed to use inspect.signature by mlouielu · Pull Request #2822 · python/cpython

terryjreedy

This commit change the get_argspec from using inspect.getfullargspec
to inspect.signature. It will improve the tip message for use.

Also, if object is not callable, now will return this message for
user, not blank tips. If the methods has an invalid method signature,
it will also return message to user.

terryjreedy

terryjreedy

terryjreedy

@terryjreedy

terryjreedy

@mlouielu

@mlouielu

terryjreedy

terryjreedy pushed a commit to terryjreedy/cpython that referenced this pull request

Aug 10, 2017

terryjreedy added a commit to terryjreedy/cpython that referenced this pull request

Aug 10, 2017
…honGH-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..
(cherry picked from commit 3b0f620)

terryjreedy added a commit that referenced this pull request

Aug 10, 2017
…2822) (#3053)

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..
(cherry picked from commit 3b0f620)