Clarify some wording as suggested by Nick Coghlan.
This commit is contained in:
parent
63fa47d96c
commit
61850a7800
|
@ -18,7 +18,9 @@ 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
|
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
|
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)! This is a problem since it
|
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.
|
prevents any guarantees to be made about the interface of exceptions.
|
||||||
This PEP proposes introducing a new superclass that all raised objects
|
This PEP proposes introducing a new superclass that all raised objects
|
||||||
must inherit from. Imposing the restriction will allow a standard
|
must inherit from. Imposing the restriction will allow a standard
|
||||||
|
|
Loading…
Reference in New Issue