summaryrefslogtreecommitdiffstats
path: root/Lib/exceptions.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1999-02-24 00:27:39 (GMT)
committerBarry Warsaw <barry@python.org>1999-02-24 00:27:39 (GMT)
commit40db48c5ec7ca447a7291062014e83b40cce9ee7 (patch)
tree03c72e671c79f4e15a86c6316a0bbcbfc25c2fa0 /Lib/exceptions.py
parentf2b4554403f42307c4543de44436db118dbd0cde (diff)
downloadcpython-40db48c5ec7ca447a7291062014e83b40cce9ee7.zip
cpython-40db48c5ec7ca447a7291062014e83b40cce9ee7.tar.gz
cpython-40db48c5ec7ca447a7291062014e83b40cce9ee7.tar.bz2
Document the correct class hierarchy for SystemExit. It is not an
error and so it derives from Exception and not SystemError. The docstring was incorrect but the implementation was fine.
Diffstat (limited to 'Lib/exceptions.py')
-rw-r--r--Lib/exceptions.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/exceptions.py b/Lib/exceptions.py
index 2963c04..e943f7b 100644
--- a/Lib/exceptions.py
+++ b/Lib/exceptions.py
@@ -11,10 +11,11 @@ Most existing code should continue to work with class based exceptions. Some
tricky uses of IOError may break, but the most common uses should work.
Here is a rundown of the class hierarchy. You can change this by editing this
-file, but it isn't recommended. The class names described here are expected
-to be found by the bltinmodule.c file. If you add classes here, you must
-modify bltinmodule.c or the exceptions won't be available in the __builtin__
-module, nor will they be accessible from C.
+file, but it isn't recommended because the old string based exceptions won't
+be kept in sync. The class names described here are expected to be found by
+the bltinmodule.c file. If you add classes here, you must modify
+bltinmodule.c or the exceptions won't be available in the __builtin__ module,
+nor will they be accessible from C.
The classes with a `*' are new since Python 1.5. They are defined as tuples
containing the derived exceptions when string-based exceptions are used. If
@@ -23,9 +24,9 @@ Exception.
Exception(*)
|
+ +-- SystemExit
+-- StandardError(*)
|
- +-- SystemExit
+-- KeyboardInterrupt
+-- ImportError
+-- EnvironmentError(*)