IMHO, StopIteration should never trigger a debugger. It is an expected operation which will happen in many (most?) loops. As an Exception, it should be an exception -- not handled by the same code in the debugger.<br>--<br>
Vernon <br><br><br><div class="gmail_quote">On Fri, Sep 10, 2010 at 12:04 AM, Tony Meyer <span dir="ltr"><<a href="mailto:tony.meyer@gmail.com">tony.meyer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
> If you hit F5 and continue execution it should keep on running. You can<br>
> also disable breaking on exceptions via Debug->Exceptions and uncheck the<br>
> "thrown" column for CLR exceptions. It should just be breaking so you can<br>
> look around and seeing what's going on.<br>
<br>
>From my naive point of view, I would expect that the process continues<br>
running until (a) I stop/pause it, (b) a breakpoint is hit, or (c) an<br>
exception occurs that would normally stop the program (i.e. propagate<br>
all the way to the top). Not every exception causes execution to<br>
break, e.g. this doesn't:<br>
<br>
a = {}<br>
try:<br>
print a[1]<br>
except KeyError:<br>
print "missing"<br>
<br>
Although this does (no exceptions when run outside the debugger or<br>
with CPython, of course):<br>
<br>
def myiterator():<br>
yield 1<br>
yield 2<br>
raise StopIteration()<br>
for item in myiterator():<br>
print item<br>
<br>
What is the distinction here? Is the first considered "user handled"<br>
and the second not, even though it is correctly handled? Is it that<br>
the iteration exceptions always cause the debugger to kick in?<br>
<br>
Thanks,<br>
Tony<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
</blockquote></div><br>