[Python-Dev] problem with inspect module and Jython

Guido van Rossum guido@python.org
Tue, 11 Sep 2001 11:00:03 -0400


> Apologies for not being up to speed on the standard bug reporting process.

Go to http://sourceforge.net/tracker/?group_id=5470&atid=105470
and click on the "Submit New" link.

> There appears to be an incompatibility between the inspect module and
> Jython.
> 
> The inspect module uses "type(xxx) is types.zzz" in a number of places.
> This seems to fail when inspect is used with Jython.
> 
> Using "isinstance" instead works as shown in the example below.
> 
> My understanding is that "isinstance" is the preferred idiom in any case.

Indeed.

We're going to have to fix inspect.py to work with new types anyway,
so we'll try to take care of this.

--Guido van Rossum (home page: http://www.python.org/~guido/)