diff Lib/exceptions.py @ 9565:a091185ccfb6 legacy-trunk

Added NotImplementedError, subclassed from RuntimeError
author Barry Warsaw <barry@python.org>
date Tue, 01 Dec 1998 18:36:30 +0000
parents e578439b981f
children 5ad1a35f540c
line wrap: on
line diff
--- a/Lib/exceptions.py	Tue Dec 01 18:34:01 1998 +0000
+++ b/Lib/exceptions.py	Tue Dec 01 18:36:30 1998 +0000
@@ -12,9 +12,11 @@
 
 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.
+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 as of 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
 you define your own class based exceptions, they should be derived from
 Exception.
@@ -33,6 +35,9 @@
       |
       +-- EOFError
       +-- RuntimeError
+      |    |
+      |    +-- NotImplementedError(*)
+      |
       +-- NameError
       +-- AttributeError
       +-- SyntaxError
@@ -130,6 +135,9 @@
 class RuntimeError(StandardError):
     pass
 
+class NotImplementedError(RuntimeError):
+    pass
+
 class SystemError(StandardError):
     pass