Jerry Hill wrote:
> I believe you can check for an instance of a new-style class
> with:
> isinstance(a, object)

I'm not sure if that will ever fail. Given values from my previous post, 
I get:
In [16]: isinstance(a, object)
Out[16]: True
In [17]: isinstance(A, object)
Out[17]: True
In [18]: isinstance(b, object)
Out[18]: True
In [19]: isinstance(types, object)
Out[19]: True
In [20]: def f(): pass
    ....:
In [21]: isinstance(f, object)
Out[21]: True

Kent
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to