Update from Ethan Furman.
This commit is contained in:
parent
7506ff282f
commit
68a77c80f0
21
pep-0409.txt
21
pep-0409.txt
|
@ -113,17 +113,26 @@ were put forth on how to implement this at the language level:
|
|||
|
||||
* Use ``Ellipsis`` as the default value (the ``...`` singleton).
|
||||
|
||||
Accepted. There are no other possible values; it cannot be raised as it is
|
||||
not an exception; it has the connotation of 'fill in the rest...' as in
|
||||
``__cause__`` is not set, look in ``__context__`` for it.
|
||||
Accepted.
|
||||
|
||||
Ellipses are commonly used in English as place holders when words are
|
||||
omitted. This works in our favor here as a signal that ``__cause__`` is
|
||||
omitted, so look in ``__context__`` for more details.
|
||||
|
||||
Ellipsis is not an exception, so cannot be raised.
|
||||
|
||||
There is only one Ellipsis, so no unused values.
|
||||
|
||||
Error information is not thrown away, so custom code can trace the entire
|
||||
exception chain even if the default code does not.
|
||||
|
||||
|
||||
Language Details
|
||||
================
|
||||
|
||||
To support ``from None``, ``__context__`` will stay as it is, but
|
||||
``__cause__`` will start out as ``Ellipsis`` and will change to ``None``
|
||||
when the ``raise ... from None`` method is used.
|
||||
To support ``raise Exception from None``, ``__context__`` will stay as it is,
|
||||
but ``__cause__`` will start out as ``Ellipsis`` and will change to ``None``
|
||||
when the ``raise Exception from None`` method is used.
|
||||
|
||||
============================================ ================== =======================================
|
||||
form __context__ __cause__
|
||||
|
|
Loading…
Reference in New Issue