[Python-Dev] PEP 348: Exception Reorganization for Python 3.0

Nick Coghlan ncoghlan at gmail.com
Sun Aug 7 03:52:01 CEST 2005


Raymond Hettinger wrote:
> Please read my other, detailed post on this (8/5/2005 4:05pm). It is a 
> mistake to bypass control flow exceptions like GeneratorExit and 
> StopIteration. Those need to remain under Exception.

This is the paragraph after the one you replied to above:
[Nick Coghlan]
>> That covers the six exceptions that have been proposed to be moved out
>> from under "Exception", and, as I see it, only two of them end up making
>> the grade - SystemExit and KeyboardInterrupt, for exactly the reasons
>> Guido gives in his message above.

The remainder of my message then goes on to describe a hierarchy just as you 
suggest - SystemError, MemoryError, StopIteration and GeneratorExit are all 
still caught by "except Exception:". The only two exceptions which are no 
longer caught by "except Exception:" are KeyboardInterrupt and SystemExit.
Cheers,
Nick.
-- 
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
 http://boredomandlaziness.blogspot.com


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /