Undefining functions and classes

Vesselin Iliev Peev VesselinPeev at operamail.com
Thu Jul 12 00:03:22 CEST 2001


Does anyone know how to undefine a function or class in Python
i.e. if we execute
def func()
  blah
  blah

and then, supposedly
unbind func

executing

func()

will give us an error that the symbol is not defined


If you anyone can point me to a way of doing this (preferably via C) or 
through Python, I'd be very grateful. As you can guess, I need this to 
conserve memory during prolonged interpreter execution (deleting unused 
function/class defs)
Thanks in advance.





More information about the Python-list mailing list