Message243204
>> 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. |
|
Date |
User |
Action |
Args |
2015-05-14 15:59:47 | yselivanov | set | recipients:
+ yselivanov, brett.cannon, pitrou, larry, r.david.murray |
2015-05-14 15:59:47 | yselivanov | set | messageid: <1431619187.5.0.213142298965.issue24190@psf.upfronthosting.co.za> |
2015-05-14 15:59:47 | yselivanov | link | issue24190 messages |
2015-05-14 15:59:47 | yselivanov | create | |
|