Various edits to improve sentences

This commit is contained in:
Andrew M. Kuchling 2006-03-09 18:22:01 +00:00
parent f6659b5348
commit ce8d288cea
1 changed files with 4 additions and 5 deletions

View File

@ -17,11 +17,11 @@ Abstract
In Python 2.4 and before, any (classic) class can be raised as an
exception. The plan is to allow new-style classes starting in Python
2.5, but this makes the problem worse -- it would mean *any* class (or
instance) can be raised (this is not the case in the final version;
instance) can be raised! (This is not the case in the final version;
only built-in exceptions can be new-style which means you need to
inherit from a built-in exception to have user-defined exceptions also
by new-style)! This is a problem since it
prevents any guarantees to be made about the interface of exceptions.
be new-style) This is a problem because it
prevents any guarantees from being made about the interface of exceptions.
This PEP proposes introducing a new superclass that all raised objects
must inherit from. Imposing the restriction will allow a standard
interface for exceptions to exist that can be relied upon.
@ -159,8 +159,7 @@ does not occur.
SystemExit has been moved for similar reasons. Since the exception is
raised when ``sys.exit()`` is called the interpreter should normally
be allowed to terminate. Unfortunately overly broad ``except``
clauses can prevent the exit to occur which had been explicitly
requested.
clauses can prevent the explicitly requested exit from occurring.
To make sure that people catch Exception most of the time, various
parts of the documentation and tutorials will need to be updated to