[docs] A confusing detail in Documentation
taihengw at gmail.com
Thu Mar 19 07:06:16 CET 2015
Hi, I am a new beginner learning python by the Documentation now. In the
Python2.7.9.Documentation topic 4.4 break and continue Statements, and else
Clauses o Loops, there have a example program show the else belongs to for
loop. I found in the first circle, the range(2,2) should be a empty list,
so the expression "for x in range(2,n)" should return x is null or empty. I
don't know why the next if condition run well and just return false. I
think there should report a exception. Hope someone can tell me the reason.
Thanks a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the docs