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 > > And so you have managed to separate one set of looping conditions into two > parts. What is the significance of the name âstylesâ? None at all. What > purpose does it serve? None, really. Does it ease the maintenance burden? > No, but by splitting your attention across two places, it actually adds to > it. I suppose readability is in the eye of the reader, but, yes, I agree that I have split this into two parts. The parts are 1) The table of data 2) The looping construct 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. You may disagree. That's OK.
-- http://mail.python.org/mailman/listinfo/python-list