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? > > Mark
>>> foo = "bar" >>> del foo >>> foo Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'foo' is not defined >>> Be aware of functions that declare global variables though: >>> def foo(): ... global bar ... bar = 10 ... >>> foo() >>> bar 10 >>> del bar >>> bar Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'bar' is not defined >>> foo() >>> bar 10 Diez -- http://mail.python.org/mailman/listinfo/python-list