Comparing variable types

KefX keflimarcusx at aol.comNOSPAM
Sat Oct 25 22:56:44 EDT 2003


>What you probably want is:
>
>>>> import types
>>>> type(i) == types.FloatType
>True
>>>>

Using isinstance() as I described earlier is probably better because I think it
works better with the idea of unifying types and classes.

- Kef




More information about the Python-list mailing list