[Python-3000-checkins] r58075 - python/branches/py3k/Doc/tutorial/errors.rst

Guido van Rossum guido at python.org
Mon Sep 10 02:42:57 CEST 2007


Um, that's incorrect. They must still be parenthesized. (This is so
that old code doesn't accidentally change its meaning when it isn't
explicitly converted.)

On 9/9/07, collin.winter <python-3000-checkins at python.org> wrote:
> Author: collin.winter
> Date: Mon Sep 10 02:32:45 2007
> New Revision: 58075
>
> Modified:
>    python/branches/py3k/Doc/tutorial/errors.rst
> Log:
> Fix docs that imply that tuples in except clauses must be parenthesized.
>
> Modified: python/branches/py3k/Doc/tutorial/errors.rst
> ==============================================================================
> --- python/branches/py3k/Doc/tutorial/errors.rst        (original)
> +++ python/branches/py3k/Doc/tutorial/errors.rst        Mon Sep 10 02:32:45 2007
> @@ -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.
> _______________________________________________
> Python-3000-checkins mailing list
> Python-3000-checkins at python.org
> http://mail.python.org/mailman/listinfo/python-3000-checkins
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000-checkins mailing list