for: else: - any practical uses for the else clause?
MonkeeSage
MonkeeSage at gmail.com
Sat Sep 30 03:56:38 EDT 2006
Sybren Stuvel wrote:
> I must say that the for/else construct is a LOT more readable than the
> rewritten alternatives.
+1
I just wish it had a more intuitive name like "after:" or "then:", as
"else:" seems like a choice between the loop and the other block (but
really the choice is between StopIteration and break).
Regards,
Jordan
More information about the Python-list
mailing list