labeled break/continue

Stefan Sonnenberg-Carstens stefan.sonnenberg at
Tue Jun 19 22:47:10 CEST 2007

Matt Chisholm schrieb:
> On Mon, 18 Jun 2007 05:28, faulkner <faulkner891 at> wrote:
>> On Jun 18, 12:35 am, Matt Chisholm <matt-pyt... at> wrote:
>>> Hi.  I was wondering if there had ever been an official decision on
>>> the idea of adding labeled break and continue functionality to Python.
> <snip>
>> python-dev just mentioned that the BDFL vetoed it a while ago.
>> they're writing a PEP just to document why it was vetoed.
> Really?  I can't find anything in the python-dev archives, or in the
> list of PEPs.  Does anyone know the PEP number (if one has been
> assigned)?  Or maybe someone could send me a link to the discussion or
> forward the discussion to me off list?  That would be much
> appreciated.
> -matt
What should a labled break/continue be good for ?
Sounds like goto to me, which is also almost useless in almost every case.
And to me, a solution are local functions, or properly defined if elif
else stmts.
A local function with no params and/or returns is as good as labeled
What python really need is a switch stmt ;-) (Even perl6 will have one -
if one will ever
have perl6...)

More information about the Python-list mailing list