Nick Coghlan added the comment:

Ah, I had indeed missed the fact that getfullargspec() was still calling 
isfunction(). In that case, is the patch currently actually buying us anything 
much beyond handling __signature__ attributes? Most of the new types that 
inspect.signature() supports will still fail that preliminary check, so code 
will need to use the new API explicitly in order to benefit from it.

By contrast, if we remove the check, then there's a wider range of exceptions 
that may be thrown, but also a much wider variety of inputs supported.

Instead of keeping the check, we could just unconditionally convert exceptions 
from the signature call to a TypeError in order to maintain compatibility with 
the old external behaviour.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17481>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to