[issue2724] Error in Python tutorial (http://docs.python.org/tut/node6.html)

2008-04-30 Thread Sandeep Sabnani
Sandeep Sabnani <[EMAIL PROTECTED]> added the comment: Oh yes! Thanks for clearing my doubt and apologies for the silly error. __ Tracker <[EMAIL PROTECTED]> __

[issue2724] Error in Python tutorial (http://docs.python.org/tut/node6.html)

2008-04-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: No, the example is correct, and gives the expected output. >From the output you show, I suppose that you indented the "else:" clause incorrectly: it should align with the "for" loop, not the "if" statement. The "for...else.." construct

[issue2724] Error in Python tutorial (http://docs.python.org/tut/node6.html)

2008-04-30 Thread Sandeep Sabnani
New submission from Sandeep Sabnani <[EMAIL PROTECTED]>: Section 4.4 on page http://docs.python.org/tut/node6.html has a for loop which uses the range function. However, the displayed output of that loop is not correct. I ran the same code and got the output as follows: 3 is a prime number 4 = 2