'break' Causes Execution of Procedure?
Peter Otten
__peter__ at web.de
Wed Aug 11 13:36:50 EDT 2004
Scott Brady Drummonds wrote:
> I have a bug in a script of several hundred lines of code that I cannot
> figure out. I have attempted (unsuccessfully) to duplicate this problem
> in
> a smaller script that I can post here but have been unsuccessful. As
> such, I'm posting code snippets here in the hopes that someone recognizes
> a very basic mistake I've made and can straighten me out.
Unfortunately you seem to have picked the wrong snippets, which by the way
look made-up. The only error I see
if key in skipList:
...
should probably be
if cycle in skipList:
....
The "most basic" error would be a print statement producing
> DEBUG: begin main procedure
sitting in a second place where it doesn't belong and isn't expected.
> How is it possible that the call to 'break' is seemingly being replaced
> with a call to 'main'?
Other than with a buggy C-extension that is not possible.
Peter
More information about the Python-list
mailing list