[New-bugs-announce] [issue22998] inspect.Signature and default arguments
Walter Dörwald
report at bugs.python.org
Thu Dec 4 21:14:01 CET 2014
New submission from Walter Dörwald:
inspect.Signature.bind() doesn't add values for parameters that are unspecified but have a default value. The documentation at https://docs.python.org/3/library/inspect.html#inspect.BoundArguments.arguments includes an example how to add default values, but that example doesn't work for the * and ** parameters.
This patch adds a new method Signature.bind_with_defaults() that works like Signature.bind(), but includes parameters with a default value (and can handle values for the * and ** parameters).
----------
components: Library (Lib)
files: signature-bind.diff
keywords: patch
messages: 232150
nosy: doerwalter
priority: normal
severity: normal
status: open
title: inspect.Signature and default arguments
type: enhancement
Added file: http://bugs.python.org/file37362/signature-bind.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22998>
_______________________________________
More information about the New-bugs-announce
mailing list