summaryrefslogtreecommitdiffstats
path: root/Doc/library/inspect.rst
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2014-12-05 03:47:44 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2014-12-05 03:47:44 (GMT)
commita5ef83244bc34c3572208093da45231bab7741bc (patch)
treedb7eaebe01db75523f362102021e0293b55a09c0 /Doc/library/inspect.rst
parentf3e2e09213ecac36c3c3634a06cb7badf3e4217e (diff)
downloadcpython-a5ef83244bc34c3572208093da45231bab7741bc.zip
cpython-a5ef83244bc34c3572208093da45231bab7741bc.tar.gz
cpython-a5ef83244bc34c3572208093da45231bab7741bc.tar.bz2
docs.inspect: Fix BoundArguments example. Issue #22998.
Diffstat (limited to 'Doc/library/inspect.rst')
-rw-r--r--Doc/library/inspect.rst3
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