On Mar 5, 10:44 pm, "Troels Thomsen" <nej tak ...> wrote: > > The primary use case is searching a container: > > > prep_tasks() > > for item in container: > > if predicate(item): > > found_tasks() > > break > > else: > > not_found_tasks() > > follow_up_tasks > > I've found myself mimicing this again and again in c, and was pleased to > find it in python and use it regularely. > int i > for (i = 0 ; i < 10 ; ++i) > blah > if i == 10 > not_found_tasks() > > The discussion of words is silly. My surprise about "else following a for > loop.... what the heck ...." lasted excactly as long as it takes to read > this sentence. > > tpt
-- http://mail.python.org/mailman/listinfo/python-list