[Python-ideas] Loop labels

Simon Sapin simon.sapin at kozea.fr
Thu Mar 8 20:39:00 CET 2012


Le 08/03/2012 20:14, Matt Joiner a écrit :
> The with statement is not a loop statement and would not be extended, so
> this is not an issue.

Yes, no conflict here. Only the precedent of the with statement set the 
expectation that "as" is followed by a variable name.


> It would be nonsensical to assign to loop labels, so I figure there
> would be some non trivial checks done when a function is compiled. You
> raise an interesting point.

So: same namespace, but incompatible usage? Ie, if a name is a loop 
label, any operation on it other than break/continue is forbidden?

-- 
Simon Sapin



More information about the Python-ideas mailing list