isinstance is broken
Gonçalo Rodrigues
op73418 at mail.telepac.pt
Sat Jan 18 13:10:22 EST 2003
On 18 Jan 2003 08:50:25 -0800, mis6 at pitt.edu (Michele Simionato) wrote:
>There are inconsistencies in "isinstance".
>
>Example 1:
>
>>>> isinstance(int,object)
>1
>
>gives no error message. I don't like it, an error should be
>raised. There is issubclass for that job:
>
>>>> issubclass(int,object)
>1
>
I think you are wrong here. *Every* builtin object, types included, are
instances of object. In another way, everything (builtin) in Python is
an object in the two meanings of the word.
With my best regards,
G. Rodrigues
More information about the Python-list
mailing list