Yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/break.html

From ZCubes Wiki
Revision as of 20:08, 7 November 2013 by MassBot1 (talk | contribs) (Created page with "<div class="navigation"> {| width="100%" cellspacing="2" align="center" | yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/raise.html|[[Image:yurttas_PL_SL_...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


6.9 The break statement

break_stmt:     "break"

break may only occur syntactically nested in a for or while loop, but not nested in a function or class definition within that loop.

It terminates the nearest enclosing loop, skipping the optional else clause if the loop has one.

If a for loop is terminated by break, the loop control target keeps its current value.

When break passes control out of a try statement with a finally clause, that finally clause is executed before really leaving the loop.


See About this document... for information on suggesting changes.