My backwards logic

Ethan Furman ethan at stoneleaf.us
Fri Sep 5 20:41:23 CEST 2014


On 09/05/2014 10:17 AM, Ian Kelly wrote:
>
> I would not worry about the else clause as a beginner, as it's
> relatively unique to Python and tends to be somewhat confusing. Use a
> flag or refactor the function instead.

I don't disagree with this, but early exposure to "for..else is for search loops" is a good thing.  I still get tripped 
up by this as I didn't learn it that way.

--
~Ethan~



More information about the Python-list mailing list