psyco changes the return value of type()

Bernhard Herzog bh at intevation.de
Tue Oct 15 12:42:58 EDT 2002


Xiao-Qin Xia <xx758 at cam.ac.uk> writes:

> 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'>
> >>> 

I think this works as designed:

    With Python 2.2, all classes defined after the line:

    from psyco.classes import *

    automatically become a new-style class;

(from http://psyco.sourceforge.net/userguide.html)

   Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Sketch                                 http://sketch.sourceforge.net/
MapIt!                                           http://www.mapit.de/



More information about the Python-list mailing list