◐ Shell
clean mode source ↗

Message 67782 - Python tracker

PEP 3134's implicit exception chaining (if accepted) would require your
semantic, and your semantic is simpler anyway (even if the
implementation is non-trivial), so consider my objections to be dropped.

PEP 3134 also proposes implicit chaining during a finally block, which
raises questions for this case:

try:
    ...
finally:
    print(sys.exc_info())
    raise

If sys.exc_info() were removed (with no direct replacement) we'd have
that behaviour answered.  raise could be answered by making it a syntax
error, but keep in mind this may be nested in another except block:

try:
    ...
except:
    try:
        ...
    finally:
        raise

I'd prefer a syntax error in this case as well, to avoid any ambiguity
and to keep the implementation simple.