mirror of https://github.com/python/cpython
docs.inspect: Fix BoundArguments example. Issue #22998.
This commit is contained in:
parent
f3e2e09213
commit
a5ef83244b
|
@ -642,7 +642,8 @@ function.
|
||||||
((5,), {})
|
((5,), {})
|
||||||
|
|
||||||
>>> for param in sig.parameters.values():
|
>>> for param in sig.parameters.values():
|
||||||
... if param.name not in ba.arguments:
|
... if (param.name not in ba.arguments
|
||||||
|
... and param.default is not param.empty):
|
||||||
... ba.arguments[param.name] = param.default
|
... ba.arguments[param.name] = param.default
|
||||||
|
|
||||||
>>> ba.args, ba.kwargs
|
>>> ba.args, ba.kwargs
|
||||||
|
|
Loading…
Reference in New Issue