[Python-Dev] Semantic of isinstance

"Martin v. Löwis" martin at v.loewis.de
Tue Jun 27 14:52:54 CEST 2006

Martin Maly wrote:
> Thanks for the response. The code snippet I sent deals with new style
> classes only so I assume that in some cases isinstance falls back to
> old-style-like handling which then asks for __bases__ and __class__
> etc, possibly incorrectly so on new style classes.

Again, I believe this is all included for ExtensionClasses: it looks
for __class__ on the object if the type check fails, so that an
ExtensionClass could be actually a class derived from the C type.


More information about the Python-Dev mailing list