[Python-ideas] SyntaxWarning for for/while/else without break or return?

Stephen J. Turnbull stephen at xemacs.org
Sun Oct 11 11:23:13 CEST 2009

Georg Brandl writes:
 > Terry Reedy schrieb:

 > > 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?

Sheesh.  Now *you*'re doing it.

He and Steven have explained their use case at length, and it's valid.

Please keep to the point, which is the relative importance of the
stylistic and didactic value of placing associated code inside the
for-else block rather than outside it, versus the attractive nuisance
that this construct is for many programmers.

More information about the Python-ideas mailing list