Fix/clarify stuff based on suggestions from Mark Summerfield.
This commit is contained in:
parent
87d33da0f4
commit
bcf9c4ac0f
16
pep-0352.txt
16
pep-0352.txt
|
@ -67,12 +67,9 @@ work in Python 2.x is covered in the `Transition Plan`_ section)::
|
|||
"""
|
||||
|
||||
def __init__(self, *args):
|
||||
"""Set the 'args' attribute'"""
|
||||
self.args = args
|
||||
|
||||
def __str__(self):
|
||||
"""Return the str of
|
||||
``args[0] if len(args) == 1 else args``."""
|
||||
if len(self.args) == 1:
|
||||
return str(self.args[0])
|
||||
else:
|
||||
|
@ -137,7 +134,7 @@ interpreter should exit will not be caught and thus be allowed to
|
|||
propagate up and allow the interpreter to terminate.
|
||||
|
||||
KeyboardInterrupt has been moved since users typically expect an
|
||||
application to exit when the press the interrupt key (usually Ctrl-C).
|
||||
application to exit when they press the interrupt key (usually Ctrl-C).
|
||||
If people have overly broad ``except`` clauses the expected behaviour
|
||||
does not occur.
|
||||
|
||||
|
@ -176,11 +173,9 @@ Here is BaseException as implemented in the 2.x series::
|
|||
"""
|
||||
|
||||
def __init__(self, *args):
|
||||
"""Set the 'args' attribute."""
|
||||
self.args = args
|
||||
|
||||
def __str__(self):
|
||||
"""Return the str of args[0] or args, depending on length."""
|
||||
return str(self.args[0]
|
||||
if len(self.args) <= 1
|
||||
else self.args)
|
||||
|
@ -204,9 +199,10 @@ Here is BaseException as implemented in the 2.x series::
|
|||
"since Python 2.6")
|
||||
return self.args[0] if len(args) == 1 else ''
|
||||
|
||||
message = property(_get_message)
|
||||
|
||||
|
||||
message = property(_get_message,
|
||||
doc="access the 'message' attribute; "
|
||||
"deprecated and provided only for "
|
||||
"backwards-compatibility")
|
||||
|
||||
|
||||
Deprecation of features in Python 2.9 is optional. This is because it
|
||||
|
@ -216,7 +212,7 @@ will not be in 3.0 . It is conceivable that no deprecation warnings
|
|||
will be used in 2.9 since there could be such a difference between 2.9
|
||||
and 3.0 that it would make 2.9 too "noisy" in terms of warnings. Thus
|
||||
the proposed deprecation warnings for Python 2.9 will be revisited
|
||||
when development of that version begins to determine if they are still
|
||||
when development of that version begins, to determine if they are still
|
||||
desired.
|
||||
|
||||
* Python 2.5 [done]
|
||||
|
|
Loading…
Reference in New Issue