Author yselivanov
Recipients brett.cannon, larry, pitrou, r.david.murray, yselivanov
Date 2015-05-14.15:59:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1431619187.5.0.213142298965.issue24190@psf.upfronthosting.co.za>
In-reply-to
Content
>> Do you guys have any good use case for such method?

> A use case was given in issue22998.
> My use case is JIT-compiling functions and function calls in Numba. We
> reimplement the function calls ourselves, so need a complete mapping of
> arguments to values.

This is a great use case ;-) Let's add it.

I propose the following method: BoundArguments.apply_defaults()

It will iterate through its parent Signature's parameters and assign default values to BoundArguments.arguments (when an arg is missing), including setting '()' for *args, and '{}' for **kwargs.

If you're OK with this, I can draft a patch.
History
Date User Action Args
2015-05-14 15:59:47yselivanovsetrecipients: + yselivanov, brett.cannon, pitrou, larry, r.david.murray
2015-05-14 15:59:47yselivanovsetmessageid: <1431619187.5.0.213142298965.issue24190@psf.upfronthosting.co.za>
2015-05-14 15:59:47yselivanovlinkissue24190 messages
2015-05-14 15:59:47yselivanovcreate