[Tutor] Testing a variable for being a number,
string or other object...
Marc Barry
marc_barry at hotmail.com
Tue Aug 12 10:22:12 EDT 2003
Dear All:
My first question is how do I test if a variable is a number or a string? I
need to to do this for error checking on values passed into methods.
The second question I have is does Python have a way of testing for
instances like Java does? For example, the "instanceof" operator that lets
you determine if an instance is of a certain type?
Regards,
Marc
_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
More information about the Tutor
mailing list