From 5b5002c466f7952a81634e482d1aa9ef0f3e96f7 Mon Sep 17 00:00:00 2001 From: regexaurus Date: Tue, 27 Jun 2017 22:36:15 -0400 Subject: [PATCH] Clarification to the `break` statement (GH-2453) (GH-2459) Clarify that the break statement breaks out of the innermost enclosing for or while loop. (cherry picked from commit 36fc896740319d2c03aa2054a90a999c162517ef) --- Doc/tutorial/controlflow.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst index a264bd728bf0..c1c3d28fd077 100644 --- a/Doc/tutorial/controlflow.rst +++ b/Doc/tutorial/controlflow.rst @@ -126,7 +126,7 @@ function, see :ref:`tut-loopidioms`. :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 -- 2.47.3