Update from Ethan Furman.
This commit is contained in:
parent
a71aa54d64
commit
e28aba7b6b
11
pep-0409.txt
11
pep-0409.txt
|
@ -153,12 +153,17 @@ The default exception printing routine will then:
|
|||
|
||||
In both of the latter cases the exception chain will stop being followed.
|
||||
|
||||
Because the default value for ``__cause__`` is now ``Ellipsis``::
|
||||
Because the default value for ``__cause__`` is now ``Ellipsis`` and ``raise
|
||||
Exception from Cause`` is simply syntactic sugar for::
|
||||
|
||||
_exc = NewException()
|
||||
_exc.__cause__ = Cause()
|
||||
raise _exc
|
||||
|
||||
``Ellipsis``, as well as ``None``, is now allowed as a cause::
|
||||
|
||||
raise Exception from Ellipsis
|
||||
|
||||
is allowed and will (re)set ``__cause__`` to ``Ellipsis``.
|
||||
|
||||
|
||||
Patches
|
||||
=======
|
||||
|
|
Loading…
Reference in New Issue