Set type?

belinda thom bthom at cs.hmc.edu
Thu Jan 4 13:54:04 EST 2007


I've seen people do that using an exception, e.g.

try:
   foo
except :
   #variable foo not defined


On Jan 4, 2007, at 10:48 AM, _ wrote:

> How do you check to see if a variable is a set?  I would like to use
>
> if type(var) is types.SetType:
>    blah
>
> but that is not available in types module.  I am using 2.4
>
> -- 
> http://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list