empty clause of for loops

Tim Chase python.list at tim.thechases.com
Wed Mar 16 11:02:29 EDT 2016


On 2016-03-16 15:29, Sven R. Kunze wrote:
> I would re-use the "for-else" for this. Everything I thought I
> could make use of the "-else" clause, I was disappointed I couldn't.

Hmm...this must be a mind-set thing.  I use the "else" clause with
for/while loops fairly regularly and would be miffed if their behavior
changed.

Could I work around their absence?  Certainly.

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

-tkc





More information about the Python-list mailing list