[Python-bugs-list] isinstance(obj, extensionclass) should work? (PR#208)
da@ski.org
da@ski.org
Thu, 17 Feb 2000 17:40:05 -0500 (EST)
From: <claudius@accessoft.com>
> >>> foo
> <extension class __main__.foo at 1046c8>
> >>> isinstance(a, foo)
> Traceback (innermost last):
> File "<stdin>", line 1, in ?
> TypeError: second argument must be a class
>
> Obviously, if obj.__class__ == extension class, shouldn't
isinstance(obj,
> extension class) work fine? (Otherwise, changing a regular class
into an
> extension class would break code that uses isinstance.)
I believe this is fixed in the CVS tree. Please try again with a
recent snapshot.
--david ascher