[Python-ideas] labeled break/continue

Matt Chisholm matt-python at theory.org
Mon Jun 18 06:35:52 CEST 2007

Hi.  I was wondering if there had ever been an official decision on
the idea of adding labeled break and continue functionality to Python.

I've found a few places where the idea has come up, in the context of
named code blocks:


and in the context of discussing do/while loops and assignments in


Both of those discussions just kind of petered out or changed
direction without any conclusion.

There's also this Python 2.6 which has a similar syntax (although
different semantics) to one of the syntaxes proposed in the first
discussion above:


I would be willing to help make a case and then write a PEP for
labeled break and continue, as long as the community or the BDFL
hasn't already decided against it. 


P.S. My apologies about cross posting; python-ideas seems like a
better place to post this, but PEP 1 says to post to python-list.

More information about the Python-ideas mailing list