On 2006-08-03 09:26:54, Simon Brunning wrote:

>> import amodule
>> amodule.afunction() # Works fine
>>
>> del amodule
>> amodule.afunction() # Will die now
> 
> Note that this doesn't get rid of a module entirely. Python will still
> holds on to the module, and if you just import it again at this point,
> it won't be re-executed - you'll just get another reference to the
> original module.

Is that guaranteed, or is that just until the garbage collector has removed
the module (at some arbitrary point)?

Gerhard

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to