[Tutor] Is IDLE prone to memory losses ?

Jeff Shannon jeff@ccvcorp.com
Wed, 12 Dec 2001 09:51:17 -0800

"Jean Montambeault" <jrm@videotron.ca> wrote:

> It has no relationship to the (yes : saved) code but only to an earlier
> version to wich I added some code. Now do you gang get the same behavior
> from IDLE. I recently upgraded from Python 2.0 to 2.1 so I went from IDLE
> 0.6 to 0.8. Never noticed that behavior before ; did you ? If so what should
> I do if anything ? This bug is inconsistent : most of the time, what I
> change gets saved.

This happens to me periodically in PythonWin as well, so it may not be a specific IDLE bug, or it may be something that was borrowed from PythonWin during the upgrade from
0.6 to 0.8  ;)

Anyhow, I think that it's a matter of display only.  I've noticed that when I search for the line number that the traceback gives me, I find the error there, but it's *not*
the line that's displayed.  For instance, I counted nine lines from the start of your file, and that's where the "for c in range[1,6]:" line was.  I do not know why IDLE is
displaying the wrong text for that line, though.  I suspect that it's keeping a copy of an old version in memory, and displaying from that, but this is just a wild guess.
Hm, if we pulled out that whole for-loop, then line 9 should be the following "if x1 > 360:" test, which is what the traceback shows... that seems to fit my theory, anyhow.
;)  Did you just add that whole loop, then save & run it and got that error?

Perhaps this should be reported as a bug in IDLE?

Jeff Shannon
Credit International