C
codefire
Hi,
I'm using the isinstance built-in function. I've found the docs for it,
but there are no docs on the supported types.
For example isinstance(a, int) works fine but isinstance(s, string)
doesn't - because 'string is not known'.
I do know how to import the types module and then use defined types
such as 'types.StringType' - but the documentation says that from 2.2
this is not the preferred way.
So, where's the documentation for types I can use with isinstance, such
as 'int'?
Many thanks,
Tony
I'm using the isinstance built-in function. I've found the docs for it,
but there are no docs on the supported types.
For example isinstance(a, int) works fine but isinstance(s, string)
doesn't - because 'string is not known'.
I do know how to import the types module and then use defined types
such as 'types.StringType' - but the documentation says that from 2.2
this is not the preferred way.
So, where's the documentation for types I can use with isinstance, such
as 'int'?
Many thanks,
Tony