Message243627
Nick,
> However, as noted, I doubt the latter is worth it - let's just expose the flag to decide whether to resolve wrapper chains or not, and leave the inclusion of the already bound value in the reported signature solely as a legacy behaviour of getargspec and getfullargspec.
I agree. Please take a look at the attached patch.
BTW, Signature.from_function and Signature.from_builtin aren't documented. Do you think it's OK if I drop them? There is no good use case for them (and we have Signature.from_callable in 3.5).
Also, while working on the patch, I noticed that functools.wraps copies __annotations__ attribute. This is really strange. Most of the times, wrapper in python has signature akin to (*args, **kwargs). Blindly copying __annotations__ doesn't make any sense. What do you think about this? |
|
Date |
User |
Action |
Args |
2015-05-19 21:20:15 | yselivanov | set | recipients:
+ yselivanov, ncoghlan, larry |
2015-05-19 21:20:15 | yselivanov | set | messageid: <1432070415.65.0.944235584947.issue20691@psf.upfronthosting.co.za> |
2015-05-19 21:20:15 | yselivanov | link | issue20691 messages |
2015-05-19 21:20:15 | yselivanov | create | |
|