where are isinstance types documented?
Sybren Stuvel
sybrenUSE at YOURthirdtower.com.imagination
Tue Sep 26 06:04:46 EDT 2006
codefire enlightened us with:
> I'm using the isinstance built-in function. I've found the docs for
> it, but there are no docs on the supported types.
All types/classes are supported.
> For example isinstance(a, int) works fine but isinstance(s, string)
> doesn't - because 'string is not known'.
That is because 'string' is not a class:
print "abc".__class__.__name__
The name is 'str', not 'string'.
Sybren
--
Sybren Stüvel
Stüvel IT - http://www.stuvel.eu/
More information about the Python-list
mailing list