Message46990
Logged In: YES
user_id=1038590
Hmm, how about "terminal_exceptions" and only include
SystemExit and KeyboardInterrupt?
MWH gave a decent example on py-dev (x = range(sys.maxint))
as to why MemoryError *shouldn't* be included - there are
too many cases where a particular excessive request will
fail, but subsequent, more sensible, memory requests will
succeed. (x = list(somefile.readlines()) would be another
example)
Looking at StopIteration more closely, I'm inclined to agree
with MvL. I can't see any way to trigger it except by
calling an iterator's .next() method directly or indirectly.
And that generally means one is either in a for loop, or
iterating manually looking for StopIteration explicitly.
(For what it's worth, the original list of 'special'
exceptions was based on my reading of Tim Peter's message to
Py-Dev regarding possible restructuring of the exception
heirarchy) |
|
Date |
User |
Action |
Args |
2007-08-23 15:40:00 | admin | link | issue1038256 messages |
2007-08-23 15:40:00 | admin | create | |
|