Roy Smith <r...@panix.com> writes: > In article <iaq5ro$vp...@lust.ihug.co.nz>, > Lawrence D'Oliveiro <l...@geek-central.gen.new_zealand> wrote: > > > In message <roy-a96d07.07462302112...@news.panix.com>, Roy Smith wrote: > > > > > In this case, I think I would do: > > > > > > styles = [("normal", "image", MainWindow.ColorsNormalList), > > > ("highlighted", "highlight", MainWindow.ColorsHighlightedList), > > > ("selected", "select", MainWindow.ColorsSelectedList)] > > > > > > for in description, attr, color_list in styles: > > > blah, blah, blah
I would do the same, but fix the indentation. Making indentation depend on the *length* of the previous line is needlessly making a maintenance burden. Instead, I'd do:: styles = [ ("normal", "image", MainWindow.ColorsNormalList), ("highlighted", "highlight", MainWindow.ColorsHighlightedList), ("selected", "select", MainWindow.ColorsSelectedList)] for in description, attr, color_list in styles: # blah, blah, blah A single consistent level of indentation on continuation lines, no matter what happens to the first line. > Where we seem to disagree is whether that makes things more or less > readable :-) To me, it makes is more readable because it lets me > understand one chunk, then move on to understanding the next chunk. Agreed. > You may disagree. That's OK. It's okay until that code gets out in the wild; then it's no longer just a matter of one person's taste. Hence the need for conventions. -- \ “Anyone who puts a small gloss on [a] fundamental technology, | `\ calls it proprietary, and then tries to keep others from | _o__) building on it, is a thief.” —Tim O'Reilly, 2000-01-25 | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list