Checking for an "undefined" variable - newbie question
daniel.rawson.take!this!out! at asml.nl
Wed Aug 6 12:47:34 CEST 2003
How do I check if a variable has been defined??
The following don't appear to work:
if variable is None:
I have only one (ugly) solution:
which works, but is a bit clumsy if I just want to know if the thing already exists.
If there's a more elegant way to check this, that would be great!
Thanks . . . .
More information about the Python-list