You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Display the correct signature for a decorated function in Python 3
This patch changes it so that `inspect.signature` is used instead of
`inspect.getfullargspec` to get a function's signature, when using Python 3.
Python 3.3 introduced the `inspect.signature` function as a new way to get the
signature of a function (as an alternative to `inspect.getargspec` and
`inspect.getfullargspec`). `inspect.signature` has the advantage that it
preserves the signature of a decorated function if `functools.wraps` is used to
decorated the wrapper function. Having a function's signature available is very
hepful, especially when testing things out in a REPL.
0 commit comments