[Python-3000] else-clause on for-loops
Fredrik Lundh
fredrik at pythonware.com
Fri Mar 24 10:28:16 CET 2006
Steven Bethard wrote:
> There was talk previously_ about removing the else clause on for-loops
> (and while-loops). One possibility would be to change the else-clause
> to behave as expected above (i.e. only executed when the loop fails to
> iterate over any items).
I'm well aware that Python 3000 doesn't aim to be backwards compatible,
but I would prefer if we could refrain from subtly changing the behaviour
of existing constructs in way that breaks all existing use, and makes it un-
necessarily hard to convert old code (whether by hand or by machine).
(fwiw, the else statement in Python *always* means the same thing: exe-
cute this when the controlling condition has been tested and found false)
</F>
More information about the Python-3000
mailing list