Commit 1fc035ff authored by Collin Winter's avatar Collin Winter

Fix docs that imply that tuples in except clauses must be parenthesized.

parent 596d99aa
...@@ -115,9 +115,9 @@ A :keyword:`try` statement may have more than one except clause, to specify ...@@ -115,9 +115,9 @@ A :keyword:`try` statement may have more than one except clause, to specify
handlers for different exceptions. At most one handler will be executed. handlers for different exceptions. At most one handler will be executed.
Handlers only handle exceptions that occur in the corresponding try clause, not Handlers only handle exceptions that occur in the corresponding try clause, not
in other handlers of the same :keyword:`try` statement. An except clause may in other handlers of the same :keyword:`try` statement. An except clause may
name multiple exceptions as a parenthesized tuple, for example:: name multiple exceptions as a tuple, for example::
... except (RuntimeError, TypeError, NameError): ... except RuntimeError, TypeError, NameError:
... pass ... pass
The last except clause may omit the exception name(s), to serve as a wildcard. The last except clause may omit the exception name(s), to serve as a wildcard.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment