[issue2201] Documentation Section 4.4

2008-02-28 Thread Jarod
Jarod added the comment: @Georg: you were correct, the indentation was incorrect, I suggest that there be some additional notation be added to code examples in the documentation showing how many tabs there are, to make for an easier read and minimize on errors. __

[issue2201] Documentation Section 4.4

2008-02-28 Thread Georg Brandl
Georg Brandl added the comment: Sorry, but there must be another typo in your code. I guess the else clause isn't correctly indented -- it belongs to the "for" statement, not the "if" statement. -- nosy: +georg.brandl resolution: -> invalid status: open -> closed __

[issue2201] Documentation Section 4.4

2008-02-28 Thread Jarod
Jarod added the comment: I made a type in that line, but when the typo isn't there I get the same thing. It turns out that it was an error from running a slightly older version of the dev kit. Now that I have updated the dev kit it runs, but I end up with the following as an output: 3 is a prime

[issue2201] Documentation Section 4.4

2008-02-28 Thread Robert Lehmann
Robert Lehmann added the comment: In the example code from the tutorial you gave, there was still a comma separator between the string 'equals' and the reference `x`. This is missing when you entered the code, that's why Python is throwing an exception there. -- nosy: +lehmannro ___

[issue2201] Documentation Section 4.4

2008-02-28 Thread Jarod
New submission from Jarod: Section 4.4 of the tutorial gives example code: >>> for n in range(2, 10): ... for x in range(2, n): ... if n % x == 0: ... print n, 'equals', x, '*', n/x ... break ... else: ... # loop fell through without finding a fac