r55940 - peps/trunk/pep-0008.txt peps/trunk/pep-3134.txt
Author: collin.winter Date: Tue Jun 12 23:19:21 2007 New Revision: 55940 Modified: peps/trunk/pep-0008.txt peps/trunk/pep-3134.txt Log: Convert two usages of StandardError into Exception. Modified: peps/trunk/pep-0008.txt ============================================================================== --- peps/trunk/pep-0008.txt (original) +++ peps/trunk/pep-0008.txt Tue Jun 12 23:19:21 2007 @@ -692,7 +692,7 @@ A bare 'except:' clause will catch SystemExit and KeyboardInterrupt exceptions, making it harder to interrupt a program with Control-C, and can disguise other problems. If you want to catch all - exceptions that signal program errors, use 'except StandardError:'. + exceptions that signal program errors, use 'except Exception:'. A good rule of thumb is to limit use of bare 'except' clauses to two cases: Modified: peps/trunk/pep-3134.txt ============================================================================== --- peps/trunk/pep-3134.txt (original) +++ peps/trunk/pep-3134.txt Tue Jun 12 23:19:21 2007 @@ -231,7 +231,7 @@ so that the client doesn't have to be aware of the storage-specific details, but doesn't want to lose the underlying error information. - class DatabaseError(StandardError): + class DatabaseError(Exception): pass class FileDatabase(Database):
participants (1)
-
collin.winter