[Python-3000-checkins] r54709 - python/branches/p3yk/Lib/pydoc.py

guido.van.rossum python-3000-checkins at python.org
Sat Apr 7 05:04:08 CEST 2007


Author: guido.van.rossum
Date: Sat Apr  7 05:04:01 2007
New Revision: 54709

Modified:
   python/branches/p3yk/Lib/pydoc.py
Log:
A class used as an exception should inherit from Exception.
(Should be backported to 2.6, really.)


Modified: python/branches/p3yk/Lib/pydoc.py
==============================================================================
--- python/branches/p3yk/Lib/pydoc.py	(original)
+++ python/branches/p3yk/Lib/pydoc.py	Sat Apr  7 05:04:01 2007
@@ -2187,7 +2187,7 @@
 def cli():
     """Command-line interface (looks at sys.argv to decide what to do)."""
     import getopt
-    class BadUsage: pass
+    class BadUsage(Exception): pass
 
     # Scripts don't get the current directory in their path by default.
     scriptdir = os.path.dirname(sys.argv[0])


More information about the Python-3000-checkins mailing list