On 17/12/2010 15:53, Steve Holden wrote:

[... snip example of for-else ...]

This construct appears to be unpopular in actual use, and when it comes
up in classes and seminars there is always interesting debate as people
discuss potential uses and realise there are useful applications.

I use this not infrequently, and I like it when it seems to be an
elegant way to express the code path. But I still misremember from
time to time and assume that the "else" clause fires when the for
loop is empty.

TJG
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to