Change note on StopIteration and SystemExit on how they now have stricter

inheritance thanks to no longer inheriting from Exception.
This commit is contained in:
Brett Cannon 2005-08-04 03:41:38 +00:00
parent 0845f3255e
commit 3ad5689ae8
1 changed files with 11 additions and 2 deletions

View File

@ -85,8 +85,8 @@ New Hierarchy
+-- SystemError (stricter inheritance)
+-- ControlFlowException (new)
+-- GeneratorExit (defined in PEP 342 [PEP342]_)
+-- StopIteration (broader inheritance)
+-- SystemExit (broader inheritance)
+-- StopIteration (stricter inheritance)
+-- SystemExit (stricter inheritance)
+-- Exception
+-- StandardError
+-- ArithmeticError
@ -273,6 +273,15 @@ entirely separate exception that will not be caught by a bare ``except``
clause.
StopIteration and SystemExit
''''''''''''''''''''''''''''
Inherit from ControlFlowException instead of Exception.
By having these exceptions no longer inherit from Exception they will not be
accidentally caught by a bare ``except`` clause.
NotImplementedError
'''''''''''''''''''