Mark Tarver wrote: > In Lisp this is done so > >> (setq *g* 0) > 0 > >> *g* > 0 > >> (makunbound '*g*) > *g* > >> *g* > error: unbound variable > > How is this done in Python?
Often it is a better choice to initialize the global with a sentinel: g = None # ... g = "something meaningful" # the equivalent of checking whether it's bound: if g is not None: # use g # the eqivalent of unbinding: g = None Peter -- http://mail.python.org/mailman/listinfo/python-list