[Python-checkins] cpython (merge 3.2 -> default): Merge from 3.2
nick.coghlan
python-checkins at python.org
Thu Jun 7 14:42:47 CEST 2012
http://hg.python.org/cpython/rev/cedc68440a67
changeset: 77370:cedc68440a67
parent: 77368:e1b950cb6b74
parent: 77369:6e4ec47fba6a
user: Nick Coghlan <ncoghlan at gmail.com>
date: Thu Jun 07 22:42:29 2012 +1000
summary:
Merge from 3.2
files:
Doc/tutorial/controlflow.rst | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst
--- a/Doc/tutorial/controlflow.rst
+++ b/Doc/tutorial/controlflow.rst
@@ -187,6 +187,13 @@
(Yes, this is the correct code. Look closely: the ``else`` clause belongs to
the :keyword:`for` loop, **not** the :keyword:`if` statement.)
+When used with a loop, the ``else`` clause has more in common with the
+``else`` clause of a :keyword:`try` statement than it does that of
+:keyword:`if` statements: a :keyword:`try` statement's ``else`` clause runs
+when no exception occurs, and a loop's ``else`` clause runs when no ``break``
+occurs. For more on the :keyword:`try` statement and exceptions, see
+:ref:`tut-handling`.
+
.. _tut-pass:
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list