Life's better without builtins? (was: Life's better without braces)
moshez at math.huji.ac.il
Sat Feb 26 09:28:38 EST 2000
On Sat, 26 Feb 2000, Gerrit Holl wrote:
[I tried to write]
> def reload(module):
> del sys.modules[module]
> exec 'import '+module
[Gerrit found a bug]
> No. The 'reload()' function takes a module and returns a module:
> >>> import os
> >>> reload(os)
> <module 'os' from '/usr/local/lib/python1.5/os.pyc'>
I'm sorry, but my version is so buggy anyway, it probably isn't even
funny. Someone did have a working version -- just search this thread.
Moshe Zadka <mzadka at geocities.com>.
INTERNET: Learn what you know.
Share what you don't.
More information about the Python-list