General Type Checks (int, str, tuple, etc.)

Fabian Steiner lists at fabis-site.net
Sat Jan 28 10:16:14 EST 2006


Hello!

So far, I am using something like »if isinstance(var, int):« to 
determine, whether var's value is an integer. Now I would like to know 
if there is any better possibility to do such general checks or may a 
construct with isinstance() even fail in certain cases?

Cheers,
Fabian



More information about the Python-list mailing list