How to know when a variable is set

- madsurfer2000 at
Sat Nov 17 21:34:16 CET 2001

Michael Hudson <mwh at> wrote in message news:<uvggdl5ek.fsf at>...
> madsurfer2000 at (-) writes:
> > How can I test if a variable has been given a value, or if it's undefined?
> Why would you want to do that?  Specificaly, in what context do you
> want to know?

I like the idea of structs, and I was planning to use a class the same
way, like

class info:
... = ... 

These would be set in an event driven GUI, and I needed to know if an
attribute had been set before I saved the information. Now that I have
thought more about it, an hash table would be a better choice.

More information about the Python-list mailing list