Skip to content

[3.8] bpo-42669: Document that except rejects nested tuples (GH-23822) #23871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Doc/reference/compound_stmts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ present, must be last; it matches any exception. For an except clause with an
expression, that expression is evaluated, and the clause matches the exception
if the resulting object is "compatible" with the exception. An object is
compatible with an exception if it is the class or a base class of the exception
object or a tuple containing an item compatible with the exception.
object, or a tuple containing an item that is the class or a base class of
the exception object.

If no except clause matches the exception, the search for an exception handler
continues in the surrounding code and on the invocation stack. [#]_
Expand Down
1 change: 1 addition & 0 deletions Misc/ACKS
Original file line number Diff line number Diff line change
Expand Up @@ -1792,6 +1792,7 @@ Zachary Ware
Barry Warsaw
Steve Waterbury
Bob Watson
Colin Watson
David Watson
Aaron Watters
Henrik Weber
Expand Down