Mercurial > cpython-lru_cache-weakref
diff Doc/tutorial/errors.rst @ 43307:875052c2b7b3
Fix docs that imply that tuples in except clauses must be parenthesized.
| author | Collin Winter <collinw@gmail.com> |
|---|---|
| date | Mon, 10 Sep 2007 00:32:45 +0000 |
| parents | 9f7f3147031c |
| children | b27d349162bd |
line wrap: on
line diff
--- a/Doc/tutorial/errors.rst Mon Sep 10 00:31:50 2007 +0000 +++ b/Doc/tutorial/errors.rst Mon Sep 10 00:32:45 2007 +0000 @@ -115,9 +115,9 @@ handlers for different exceptions. At most one handler will be executed. 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 -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 The last except clause may omit the exception name(s), to serve as a wildcard.
