[Python-checkins] python/nondist/peps pep-0348.txt,1.2,1.3
bcannon@users.sourceforge.net
bcannon at users.sourceforge.net
Thu Aug 4 05:41:41 CEST 2005
Update of /cvsroot/python/python/nondist/peps
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11161
Modified Files:
pep-0348.txt
Log Message:
Change note on StopIteration and SystemExit on how they now have stricter
inheritance thanks to no longer inheriting from Exception.
Index: pep-0348.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0348.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- pep-0348.txt 4 Aug 2005 03:33:03 -0000 1.2
+++ pep-0348.txt 4 Aug 2005 03:41:38 -0000 1.3
@@ -85,8 +85,8 @@
+-- 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 @@
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
'''''''''''''''''''
More information about the Python-checkins
mailing list