Yury Selivanov added the comment: 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? ---------- keywords: +patch Added file: http://bugs.python.org/file39435/sig_wrapped.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20691> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com