On 11/05/2011 03:31 PM, Mayo Adams wrote:
Thank you for your reply, this is all I needed to know:
the loop is over when you outdent back to line up with the for statement
Indeed, the indentation rules are very simple. I just wanted to be sure
about what they were.
Sounds good. Three more comments: You replied to me privately, but
everyone else deserves to know your problem is resolved. Usually you
just do a Reply-all, and it'll go both to the list and to the
individual(s) already involved.
And in commenting about indenting, I should clarify that you should
never mix tabs and spaces in the same file. I used spaces exclusively,
and have never run into problems. My editor does not put a tab in, it's
configured differently.
Note also that a few other things indent, besides just for-loop. Same
principle applies to if statements, functions, to class definitions, to
with statements. Roughly, if the line ends with a colon, you probably
should indent all the following lines that it controls.
--
DaveA
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor