On Mon, Nov 1, 2010 at 3:16 PM, Lawrence D'Oliveiro
<[email protected]_zealand> wrote:
> In message <[email protected]>, Martin v. Loewis wrote:
>
>> (in fact, I can't think any situation where I would use the backslash).
>
> for \
> Description, Attr, ColorList \
> in \
> (
> ("normal", "image", MainWindow.ColorsNormalList),
> ("highlighted", "highlight", MainWindow.ColorsHighlightedList),
> ("selected", "select", MainWindow.ColorsSelectedList),
> ) \
> :
> ...
> #end for
>
> <http://github.com/ldo/dvd_menu_animator>
I find the level of deviation from PEP 8 in that file rather disturbing.
In any case, the backslashes are easily avoided, and readability
improved IMHO, via refactoring:
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:
...
Cheers,
Chris
--
http://blog.rebertia.com
--
http://mail.python.org/mailman/listinfo/python-list