something wrong with isinstance

Carl Banks pavlovevidence at
Fri Feb 13 05:07:58 EST 2009

On Feb 12, 10:49 am, redbaron < at> wrote:
> Don't really sure, but try to define your class as new-style one.
> Like
> class GeoMap(object):
>    ...

Well, the OP said he was using Python 3.0, where all classes are new-
style classes.

But that brings up another very slight possibility, though not a very
likely one in this case: the behavior of isinstance can be
customized.  It can happen unbeknownst to a user who subclasses a
class that does that.

Carl Banks

More information about the Python-list mailing list