psyco changes the return value of type()

Xiao-Qin Xia xx758 at cam.ac.uk
Tue Oct 15 12:09:43 EDT 2002


Hi, there,

psyco changes the return value of type():

>>> class A:
...     pass
... 
>>> a = A()
>>> 
>>> type(a)
<type 'instance'>
>>> 
>>> import psyco
>>> from psyco.classes import *
>>> 
>>> class B:
...     pass
... 
>>> b=B()
>>> type(b)
<class '__main__.B'>
>>> 

Obviously, type() has different return values, when psyco exists or not.
That is really not so good news for codes need to run on different 
situation, with or without psyco. Any way to avoid this?

Cheers,
Xiao-Qin Xia



More information about the Python-list mailing list