[issue20473] inspect.Signature no longer handles builtin classes correctly

Larry Hastings report at bugs.python.org
Mon Feb 3 15:22:25 CET 2014


Larry Hastings added the comment:

> > Also also, I remember specifically that the isinstance(type) code
> > would fail builtin classes.
>
> Could you please find an example of this?

This was during the development of the original feature.  I changed the if statement for the from_builtin() call so it'd accept type objects too.  But it never got a chance to see any, because the check for type objects above it would see that it was a type, see that it was a builtin type, and raise an exception.  That's why I moved the if statement with the from_builtin() call to the top of the function, so it would get the first chance to examine the callable.

This was just historical context, and I'm sure you already solved the problem in an equivalent way.

----------

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


More information about the Python-bugs-list mailing list