mirror of https://github.com/python/cpython
docs.inspect: Fix BoundArguments example. Issue #22998.
This commit is contained in:
parent
96a4b5adfc
commit
ed648a35ec
|
@ -678,7 +678,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