delete namespaces

Tim Golden mail at timgolden.me.uk
Wed Mar 30 15:08:48 EDT 2011


On 30/03/2011 8:03 PM, Terry Reedy wrote:
> On 3/30/2011 5:10 AM, Jean-Michel Pichavant wrote:
>
>> 3/ if you want to do the 2/ but require a painful long prologue to your
>> test, then you may want to use the builtin reload. Use it with care,
>> because any existing object created from the previous module will not be
>> affected, they'll still hold the previous code. "reload" solves some
>> problems, but bring others, especially for the newcomer.
>
> Guido removed it in 3.x because it is badly flawed and he could see any
> way to sensibly fix it.

Well, "moved" rather than "removed":

<dump>
Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52)
Type "help", "copyright", "credits" or "license"
>>> import imp
>>> imp.reload
<built-in function reload>
>>>

</dump>

TJG



More information about the Python-list mailing list