Allowing comments after the line continuation backslash

Chris Rebert clp2 at rebertia.com
Wed Nov 3 04:02:27 EDT 2010


On Mon, Nov 1, 2010 at 8:15 PM, Lawrence D'Oliveiro
<ldo at geek-central.gen.new_zealand> wrote:
> In message <mailman.469.1288654964.2218.python-list at python.org>, Chris
> Rebert wrote:
>
>> desc_attr_colors_triples = (("normal", "image",
>> MainWindow.ColorsNormalList),
>>     ("highlighted", "highlight", MainWindow.ColorsHighlightedList),
>>     ("selected", "select", MainWindow.ColorsSelectedList))
>> for in description, attr, color_list in desc_attr_colors_triples:
>>     ...
>
> And so you have managed to separate one set of looping conditions into two
> parts. What is the significance of the name “desc_attr_colors_triples”? 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.
>
> If this is all your PEP-8 can achieve, then a pox on it.

Actually, my PEP 8 reference was in regards to the (imo, terrible)
UseOfCamelCaseForNonClasses (Python != C#), not the formatting of the
for-loop; hence the "In any case" qualification.

Cheers,
Chris



More information about the Python-list mailing list