[Python-ideas] for/else statements considered harmful
ubershmekel at gmail.com
Thu Jun 7 09:23:05 CEST 2012
We had quite a lengthy discussion on for/else in October 2009
> I would not have the feature at all if I had to do it over. I would *not*
> choose another keyword. But I don't see the same level of danger in it that
> some here see.
> I am also against adding a syntax warning for this [[loops with else but
> without break]]. It belongs in pylint etc.
Personally I'd prefer "if not break:" over "else:" but as we're stuck where
we are today I'm just going to encourage people not to use the construct at
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas