In article ,
Jean-Michel Pichavant wrote:
>Aahz wrote:
>> In article ,
>> Jean-Michel Pichavant wrote:
>>>
>>> PS : You're misusing the del statement. It does not remove any object
>>> from mmory, however, it removes the reference to it, the object is still
>>> in memory. They are very few ca
Hi,
Don't use reload, this is nothing but a trap, espacially if your using
it to update your objects with the code you are writting.
JM
I've found "reload" very usable for development in IDLE. IDLE memorizes
my input, and the variables I assign output to. If restart IDLE I lose
it all
Aahz wrote:
In article ,
Jean-Michel Pichavant wrote:
PS : You're misusing the del statement. It does not remove any object
>from mmory, however, it removes the reference to it, the object is still
in memory. They are very few cases where del is usefull in python, so
try to avoid
> from m import f
>
> look for module m in the global cache
> if not there, then:
> search for m.py
> compile it to a Module object
> put the Module object in the cache
> look for object named "f" in the Module object
agree
> create a new name "f" in the local namespace
> set the name
Frederic Rentsch wrote:
>
>I develop in an IDLE window.
>
>Module M says 'from service import *'.
>Next I correct a mistake in function 'service.f'.
>Now 'service.f' works fine.
>
>I do 'reload (service); reload (M)'.
>The function 'M.f' still misbehaves.
>
>'print inspect.getsource (service.f)' a
On Fri, 09 Jul 2010 23:14:23 +0200, Frederic Rentsch wrote:
> I understand that things going out of scope delete themselves. I have
> used del on occasion, for instance, to get rid of invalid members of a
> list or a dictionary. It has to be done in two passes, though, because
> neither can be alt
On Fri, 09 Jul 2010 17:46:26 -0400, Terry Reedy wrote:
> On 7/9/2010 9:02 AM, Frederic Rentsch wrote:
>
>> I do 'reload (service); reload (M)'.
>> The function 'M.f' still misbehaves.
>
> Guido removed reload from 3.0 because it gave people false hopes and he
> gave up on fixing it.
It's not qu
On 7/9/2010 9:02 AM, Frederic Rentsch wrote:
I do 'reload (service); reload (M)'.
The function 'M.f' still misbehaves.
Guido removed reload from 3.0 because it gave people false hopes and he
gave up on fixing it.
--
Terry Jan Reedy
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 2010-07-09 at 19:38 +0200, Jean-Michel Pichavant wrote:
> Frederic Rentsch wrote:
> > I develop in an IDLE window.
> >
> > Module M says 'from service import *'.
> > Next I correct a mistake in function 'service.f'.
> > Now 'service.f' works fine.
> >
> > I do 'reload (service); reload (M)'
In article ,
Jean-Michel Pichavant wrote:
>
>PS : You're misusing the del statement. It does not remove any object
>from mmory, however, it removes the reference to it, the object is still
>in memory. They are very few cases where del is usefull in python, so
>try to avoid using it as well.
T
On Fri, 2010-07-09 at 15:58 +, Steven D'Aprano wrote:
> On Fri, 09 Jul 2010 15:02:25 +0200, Frederic Rentsch wrote:
>
> > I develop in an IDLE window.
> >
> > Module M says 'from service import *'. Next I correct a mistake in
> > function 'service.f'. Now 'service.f' works fine.
>
> from ser
Frederic Rentsch wrote:
I develop in an IDLE window.
Module M says 'from service import *'.
Next I correct a mistake in function 'service.f'.
Now 'service.f' works fine.
I do 'reload (service); reload (M)'.
The function 'M.f' still misbehaves.
'print inspect.getsource (service.f)' and
'print i
I know I have more radical options, such as starting
a new IDLE window. That would save me time, but
I'd like to take the opportunity to understand what
is happening. Surely someone out there knows.
Frederic
Or you can restart the IDLE shell with CTRL+F6.
If you can't restart it, you're
On Fri, 09 Jul 2010 15:02:25 +0200, Frederic Rentsch wrote:
> I develop in an IDLE window.
>
> Module M says 'from service import *'. Next I correct a mistake in
> function 'service.f'. Now 'service.f' works fine.
from service import *
should be considered advanced functionality that is discour
In article ,
Frederic Rentsch wrote:
>
>Module M says 'from service import *'.
>Next I correct a mistake in function 'service.f'.
>Now 'service.f' works fine.
>
>I do 'reload (service); reload (M)'.
>The function 'M.f' still misbehaves.
Absolutely!
>'print inspect.getsource (service.f)' and
>'p
I develop in an IDLE window.
Module M says 'from service import *'.
Next I correct a mistake in function 'service.f'.
Now 'service.f' works fine.
I do 'reload (service); reload (M)'.
The function 'M.f' still misbehaves.
'print inspect.getsource (service.f)' and
'print inspect.getsource (M.f)' sh
16 matches
Mail list logo