(original) (raw)
We had quite a lengthy discussion on for/else in October 2009
Guido mentioned:
Guido mentioned:
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.
http://mail.python.org/pipermail/python-ideas/2009-October/006157.html�
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 all.
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 all.
Yuval