Kaydet (Commit) 40db48c5 authored tarafından Barry Warsaw's avatar Barry Warsaw

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.
üst f2b45544
...@@ -11,10 +11,11 @@ Most existing code should continue to work with class based exceptions. Some ...@@ -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. 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 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 file, but it isn't recommended because the old string based exceptions won't
to be found by the bltinmodule.c file. If you add classes here, you must be kept in sync. The class names described here are expected to be found by
modify bltinmodule.c or the exceptions won't be available in the __builtin__ the bltinmodule.c file. If you add classes here, you must modify
module, nor will they be accessible from C. 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 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 containing the derived exceptions when string-based exceptions are used. If
...@@ -23,9 +24,9 @@ Exception. ...@@ -23,9 +24,9 @@ Exception.
Exception(*) Exception(*)
| |
+-- SystemExit
+-- StandardError(*) +-- StandardError(*)
| |
+-- SystemExit
+-- KeyboardInterrupt +-- KeyboardInterrupt
+-- ImportError +-- ImportError
+-- EnvironmentError(*) +-- EnvironmentError(*)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment