Skip to content

Commit 2b78e3f

Browse files
authored
Update Doc/reference/compound_stmts.rst
1 parent 1b4a01b commit 2b78e3f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Doc/reference/compound_stmts.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,7 @@ An expression-less :keyword:`!except` clause, if present, must be last;
249249
it matches any exception.
250250

251251
For an :keyword:`!except` clause with an expression, the
252-
expression must evaluate to an exception type or a tuple of exception types. Parentheses
253-
can be dropped if multiple exception types are provided and the ``as`` clause is not used.
252+
expression must evaluate to an exception type or a tuple of exception types. If multiple exception types are provided as a tuple expression, then parentheses are required if the ``as`` clause is used.
254253
The raised exception matches an :keyword:`!except` clause whose expression evaluates
255254
to the class or a :term:`non-virtual base class <abstract base class>` of the exception object,
256255
or to a tuple that contains such a class.

0 commit comments

Comments
 (0)