diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2014-12-05 03:48:47 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2014-12-05 03:48:47 (GMT) |
commit | ed648a35ec59f4f44f6758270b45dc0c238adb18 (patch) | |
tree | d0fc4bf9a7419dd9c2387c4662ce5bfda9d7e10f /Doc/library/inspect.rst | |
parent | 96a4b5adfcfaf1e7c9f854929e12737703aaf54f (diff) | |
download | cpython-ed648a35ec59f4f44f6758270b45dc0c238adb18.zip cpython-ed648a35ec59f4f44f6758270b45dc0c238adb18.tar.gz cpython-ed648a35ec59f4f44f6758270b45dc0c238adb18.tar.bz2 |
docs.inspect: Fix BoundArguments example. Issue #22998.
Diffstat (limited to 'Doc/library/inspect.rst')
-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 3ac66d8..3d2132f 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -678,7 +678,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 |