At 08:25 AM 3/12/2011 -0500, Eugene Toder wrote:
Right, I'm not suggesting to remove all blocks, only SETUP_LOOP
blocks. Do you see the problem in that case?
I think you guys are forgetting about FOR_ITER, listcomps, and the like.
That is, IIRC, the reason loops use the block stack is because they
put things on the regular stack, that need to be cleared off the
stack when the loop is exited (whether normally or via an exception).
In other words, just jumping out of a loop without popping the block
stack would leave junk on the regular stack, thereby failing to
deallocate the loop iterator. In the case of a nested loop, this
would also mean that the outer loop would start using the inner
loop's iterator, and all sorts of hilarity would then ensue.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com