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 <rep...@bugs.python.org> <http://bugs.python.org/issue22998> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com