On 3/16/2016 11:17 AM, Sven R. Kunze wrote:
On 16.03.2016 16:02, Tim Chase wrote:

Does it annoy me when I have to work in other languages that lack
Python's {for/while}/else functionality?  You bet.

I can imagine that. Could you describe the general use-case? From what I
know, "else" is executed when you don't "break" the loop. When is this
useful?

When one wants to know if the iterable contained an exceptional item or not or when one wants to know if the iterator is exhausted or not.

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to