diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2014-12-05 03:47:44 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2014-12-05 03:47:44 (GMT) |
commit | a5ef83244bc34c3572208093da45231bab7741bc (patch) | |
tree | db7eaebe01db75523f362102021e0293b55a09c0 /Doc/library | |
parent | f3e2e09213ecac36c3c3634a06cb7badf3e4217e (diff) | |
download | cpython-a5ef83244bc34c3572208093da45231bab7741bc.zip cpython-a5ef83244bc34c3572208093da45231bab7741bc.tar.gz cpython-a5ef83244bc34c3572208093da45231bab7741bc.tar.bz2 |
docs.inspect: Fix BoundArguments example. Issue #22998.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/inspect.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index a7c127c..c540b11 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -642,7 +642,8 @@ function. ((5,), {}) >>> 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.args, ba.kwargs |