[issue27172] Add skip_bound_arg argument to inspect.Signature.from_callable()

Nick Coghlan report at bugs.python.org
Tue Jun 21 15:43:10 EDT 2016


Nick Coghlan added the comment:

Hi Ryan, sorry for the delayed response.

My own concern with this proposal is that I don't understand the use case for it. We changed the inspect.signature behaviour away from that of inspect.getfullargspec because we considered the latter behaviour to be *wrong*: it reported a parameter the already bound method didn't actually accept when called. The "skip_bound_arg" functionality then remains *within* the inspect module for the sake of providing backwards compatible implementations of getargspec and getfullargspec without duplicating a lot of other callable introspection logic.

If you can provide more information on the motivating use case, we can better determine if exposing this option directly is a suitable design response, or if there may be better alternatives available.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27172>
_______________________________________


More information about the Python-bugs-list mailing list