From: regexaurus Date: Wed, 28 Jun 2017 02:37:05 +0000 (-0400) Subject: Clarification to the `break` statement (GH-2453) (GH-2458) X-Git-Tag: v3.5.4rc1~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9dff523e42a5f8eca8e88151785be54468e57969;p=thirdparty%2FPython%2Fcpython.git Clarification to the `break` statement (GH-2453) (GH-2458) Clarify that the break statement breaks out of the innermost enclosing for or while loop. (cherry picked from commit 36fc896740319d2c03aa2054a90a999c162517ef) --- diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst index fbe4e924f0c5..6af72822fcd7 100644 --- a/Doc/tutorial/controlflow.rst +++ b/Doc/tutorial/controlflow.rst @@ -154,7 +154,7 @@ Later we will see more functions that return iterables and take iterables as arg :keyword:`break` and :keyword:`continue` Statements, and :keyword:`else` Clauses on Loops ========================================================================================= -The :keyword:`break` statement, like in C, breaks out of the smallest enclosing +The :keyword:`break` statement, like in C, breaks out of the innermost enclosing :keyword:`for` or :keyword:`while` loop. Loop statements may have an ``else`` clause; it is executed when the loop