On 11/9/10 4:51 PM, Mark Wooding wrote:
Lawrence D'Oliveiro<l...@geek-central.gen.new_zealand> writes:
In message<87fwvdb69k.fsf....@metalzone.distorted.org.uk>, Mark Wooding
wrote:
for descr, attr, colours in [
('normal', 'image', 'Normal'),
('highlighted', 'highlight', 'Highlighted'),
('selected', 'select', 'Selected')]:
colourlist = getattr(MainWindow, 'Colors%sList' % colours)
## ...
But then you lose the ability to match up the bracketing symbols.
You're right. I do.
That’s why I put them on lines by themselves.
But the bracketing symbols are thoroughly uninteresting! All that
putting them on their own lines achieves is to draw attention to the
scaffolding at the expense of the building. It's great if you like the
Pompidou Centre, I suppose...
For me, putting the brackets on their own lines (and using a trailing comma) has
little to do with increasing readability. It's for making editing easier.
Keeping all of the items consistent means that in order to add, delete, or move
any item is the same operation everywhere in the list whether it is the first
item, last item, or any item in between.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://mail.python.org/mailman/listinfo/python-list