On 2009-09-22, Brown, Rodrick <rodrick.br...@citi.com> wrote: > How could I do the following check in Python > > In Perl I could do something like if ((defined($a)) { ... }
try: yourNameHere except NameError: print "undefined" else: print "defined" > I tried if var is not None: > However this doesn't seem to work as described. As described where? -- Grant Edwards grante Yow! I feel like a wet at parking meter on Darvon! visi.com -- http://mail.python.org/mailman/listinfo/python-list