Message176551
When a loop (for loop in this case) contains multiple lines of code, if the lines are inconsistently indented, the for loop will only execute those lines on the final pass through the loop with no type of warning regarding indentation error.
Ex.
for i in range(0,10):
print "I will print on every iteration: %d" % i # TAB indented
print "I will only print on the final iteration: %d" % i # 4 spaces |
|
Date |
User |
Action |
Args |
2012-11-28 16:02:00 | dimitriprosser | set | recipients:
+ dimitriprosser |
2012-11-28 16:02:00 | dimitriprosser | set | messageid: <1354118520.63.0.69805798217.issue16571@psf.upfronthosting.co.za> |
2012-11-28 16:02:00 | dimitriprosser | link | issue16571 messages |
2012-11-28 16:01:59 | dimitriprosser | create | |
|