On Jul 11, 11:45 am, wheres pythonmonks <wherespythonmo...@gmail.com> wrote: > On #4: So there are some hacks, but not something as easy as "import > unimportable" or an @noexport decorator. The underscore works, so > does "del".
Careful. If you have a module that looks like this: def foo(): bar() def bar(): print "hello" del bar # bar is an internal function It won't work; foo will raise NameError on bar if you try that. However, del is useful to clean up code you run at module import time, for example: squares = [] for i in xrange(101): squares.append(i*i) del i Carl Banks -- http://mail.python.org/mailman/listinfo/python-list