[Python-ideas] Loop labels

Simon Sapin simon.sapin at kozea.fr
Thu Mar 8 19:57:54 CET 2012

Le 08/03/2012 19:52, Matt Joiner a écrit :
> Allow for and while statements to be labelled using "as".

I like the idea. But regardless of whether it should be added at all, I 
see one issue with the proposition in its current form.

The with statement has a variable name after its own "as" keyword. Do 
loop labels live in the same namespace as variables? Or can I have a 
variable with the same name as a loop label without the two interfering?

Simon Sapin

More information about the Python-ideas mailing list