[Python-3000] Could isinstance/issubclass overriding be dangerous?
Phillip J. Eby
pje at telecommunity.com
Mon Apr 30 17:30:17 CEST 2007
At 06:27 PM 4/30/2007 +1200, Greg Ewing wrote:
>So can we please have another couple of functions that just
>do a simple, reliable concrete type test?
I believe the operation you're looking for (i.e., C-level layout
compatibility) is:
C in type.__mro__.__get__(type(x))
or in Pyrex:
C in (((PyTypeObject *) type(x)).tp_mro)
More information about the Python-3000
mailing list