Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1fc035f

Browse files
committed
Fix docs that imply that tuples in except clauses must be parenthesized.
1 parent 596d99a commit 1fc035f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/tutorial/errors.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ A :keyword:`try` statement may have more than one except clause, to specify
115115
handlers for different exceptions. At most one handler will be executed.
116116
Handlers only handle exceptions that occur in the corresponding try clause, not
117117
in other handlers of the same :keyword:`try` statement. An except clause may
118-
name multiple exceptions as a parenthesized tuple, for example::
118+
name multiple exceptions as a tuple, for example::
119119

120-
... except (RuntimeError, TypeError, NameError):
120+
... except RuntimeError, TypeError, NameError:
121121
... pass
122122

123123
The last except clause may omit the exception name(s), to serve as a wildcard.

0 commit comments

Comments
 (0)