Deprecating reload() ???

Ellinghaus, Lance lance.ellinghaus at eds.com
Thu Mar 11 15:10:59 EST 2004


> > Other surprises:  Deprecating reload()

>Reload doesn't work the way most people think
>it does: if you've got any references to the old module,
>they stay around. They aren't replaced.

>It was a good idea, but the implementation simply
>doesn't do what the idea promises.

I agree that it does not really work as most people think it does, but how
would you perform the same task as reload() without the reload()? 

Would this be done by "del sys.modules['modulename']" and then perform an
'import'?

I use reload() for many purposes, knowing how it works/does not work.

Lance Ellinghaus




More information about the Python-list mailing list