George Sakkis wrote: > There are no unitialized variables in python; if you try to access an > undefined name, a NameError exception is raised: > > try: > print "foo is", foo > except NameError: > print "foo is undefined"
note the order of evaluation: >>> try: ... print "foo is", foo ... except NameError: ... print "foo is undefined" ... foo is foo is undefined >>> </F> -- http://mail.python.org/mailman/listinfo/python-list