Steven D'Aprano at 2016/6/29 UTC+8 10:43:52AM wrote:
> The "else" in for...else has nothing to do with any "if" inside the for
> block.

Yes, the "else" has nothing to do with "break" syntactically in Python 
language, but semantically in English it cause confusion. When I said "insane", 
I just want to emphasis this situation. 

"else" should appear only when there is a "break" in the "for" block, then "for 
...break... else ..." become perfectly alright semantically. Never think of it 
in "for ...else ..." or the confusion bond to come up:-)

--Jach


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

Reply via email to