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

Stephen J. Turnbull stephen at xemacs.org
Thu Oct 8 18:19:35 CEST 2009

Masklinn writes:

 > Both would, because in both cases the `else:` clause serves no purpose  
 > whatsoever. It's noise.

Tut, tut.  In Nick's proposal, both would raise because there is an
"else:" but there is no break.  I doubt the Python compiler would add
the editorial comment about "noise," though.<wink>

More information about the Python-ideas mailing list