summaryrefslogtreecommitdiffstats
path: root/Lib/dos-8x3/exceptio.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-10-02 01:23:47 (GMT)
committerGuido van Rossum <guido@python.org>1998-10-02 01:23:47 (GMT)
commit64e736ba4e8c7d706f705e1e34a24f8e24d285d6 (patch)
treea097506524d3530d65427918ce01171bb5ac2e8d /Lib/dos-8x3/exceptio.py
parentfdb8fb8b312bb9814bca5c153c8246fed2156c81 (diff)
downloadcpython-64e736ba4e8c7d706f705e1e34a24f8e24d285d6.zip
cpython-64e736ba4e8c7d706f705e1e34a24f8e24d285d6.tar.gz
cpython-64e736ba4e8c7d706f705e1e34a24f8e24d285d6.tar.bz2
Some new blood and some updated versions.
Diffstat (limited to 'Lib/dos-8x3/exceptio.py')
-rw-r--r--Lib/dos-8x3/exceptio.py32
1 files changed, 20 insertions, 12 deletions
diff --git a/Lib/dos-8x3/exceptio.py b/Lib/dos-8x3/exceptio.py
index 28711df..9c733ce 100644
--- a/Lib/dos-8x3/exceptio.py
+++ b/Lib/dos-8x3/exceptio.py
@@ -1,19 +1,23 @@
"""Class based built-in exception hierarchy.
-This is a new feature whereby all the standard built-in exceptions,
-traditionally string objects, are replaced with classes. This gives
-Python's exception handling mechanism a more object-oriented feel.
+New with Python 1.5, all standard built-in exceptions are now class objects by
+default. This gives Python's exception handling mechanism a more
+object-oriented feel. Traditionally they were string objects. Python will
+fallback to string based exceptions if the interpreter is invoked with the -X
+option, or if some failure occurs during class exception initialization (in
+this case a warning will be printed).
-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.
+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.
-To disable this feature, start the Python executable with the -X option.
+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.
-Here is a rundown of the class hierarchy. You can change this by
-editing this file, but it isn't recommended. The classes with a `*'
-are new with this feature. They are defined as tuples containing the
-derived exceptions when string-based exceptions are used.
+The classes with a `*' are new as of Python 1.5. They are defined as tuples
+containing the derived exceptions when string-based exceptions are used. If
+you define your own class based exceptions, they should be derived from
+Exception.
Exception(*)
|
@@ -22,7 +26,11 @@ Exception(*)
+-- SystemExit
+-- KeyboardInterrupt
+-- ImportError
- +-- IOError
+ +-- EnvironmentError(*)
+ | |
+ | +-- IOError
+ | +-- OSError(*)
+ |
+-- EOFError
+-- RuntimeError
+-- NameError