diff options
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r-- | Lib/inspect.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py index 57c0487..512785f 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -2254,7 +2254,8 @@ def _signature_from_callable(obj, *, return sig else: sig_params = tuple(sig.parameters.values()) - assert first_wrapped_param is not sig_params[0] + assert (not sig_params or + first_wrapped_param is not sig_params[0]) new_params = (first_wrapped_param,) + sig_params return sig.replace(parameters=new_params) |