[Python-ideas] SyntaxWarning for for/while/else without break or return?
g.brandl at gmx.net
Sun Oct 11 10:07:38 CEST 2009
Terry Reedy schrieb:
>> In this thread, the proposal is that we encourage people to only use the
>> else clause on loops containing at least one break statement.
> Whereas I want to be able to use while/else and for/else in didactic
> code without having to warn people against a spurious warning.
Why would you want to do that, except to confuse a new generation of
Python programmers about its semantics?
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.
More information about the Python-ideas