From a5ef83244bc34c3572208093da45231bab7741bc Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Thu, 4 Dec 2014 22:47:44 -0500 Subject: docs.inspect: Fix BoundArguments example. Issue #22998. --- Doc/library/inspect.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v0.12