diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index a7c127cb3f7..c540b116457 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