[Python-ideas] for/else syntax

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Oct 3 03:33:29 CEST 2009


Michael Foord wrote:

> Nonsense - there are several other ways to break out of a loop. Raising 
> an exception or returning for example.

But both of those bypass any code following the
for-loop, so there is no need for an else-clause
in those cases.

-- 
Greg



More information about the Python-ideas mailing list