Author yselivanov
Recipients larry, ncoghlan, yselivanov
Date 2015-05-19.21:20:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1432070415.65.0.944235584947.issue20691@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2015-05-19 21:20:15yselivanovsetrecipients: + yselivanov, ncoghlan, larry
2015-05-19 21:20:15yselivanovsetmessageid: <1432070415.65.0.944235584947.issue20691@psf.upfronthosting.co.za>
2015-05-19 21:20:15yselivanovlinkissue20691 messages
2015-05-19 21:20:15yselivanovcreate