This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author doerwalter
Recipients doerwalter
Date 2014-12-04.20:14:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1417724041.66.0.201313804397.issue22998@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2014-12-04 20:14:01doerwaltersetrecipients: + doerwalter
2014-12-04 20:14:01doerwaltersetmessageid: <1417724041.66.0.201313804397.issue22998@psf.upfronthosting.co.za>
2014-12-04 20:14:01doerwalterlinkissue22998 messages
2014-12-04 20:14:01doerwaltercreate