type() for new style classes - buggy?
sidharthk at hotmail.com
Wed Jan 28 15:57:02 CET 2004
In the case of new style classes type actually doubles up as a class
constructor, so all classes including type itself are instances type.
>>> class A(object):
>>> a = A()
>>> isinstance(A, type)
>>> isinstance(a, type)
>>> isinstance(type, type)
hope this helps
there is some documentation on new style classes you might want to read.
particularly the first essay by Guido.
More information about the Python-list