isinstance is broken
Erik Max Francis
max at alcyone.com
Mon Jan 20 06:21:20 EST 2003
Michael Hudson wrote:
> I think not, because a type is always an object.
>
> isinstance(c, object) == issubclass(type(c), object) == True.
> ^
> except for old-style instances
Why would an explicit equality comparison to True (or False) ever be
useful?
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ Love is the wisdom of the fool and the folly of the wise.
\__/ Samuel Johnson
PyUID / http://www.alcyone.com/pyos/uid/
A module for generating "unique" IDs in Python.
More information about the Python-list
mailing list