Allowing comments after the line continuation backslash

Tim Chase python.list at tim.thechases.com
Wed Nov 10 03:23:14 CET 2010


On 11/09/10 19:39, Mark Wooding wrote:
> Tim Chase<python.list at tim.thechases.com>  writes:
>> It also makes diff's much easier to read
>
> Hmm.  That's a good point, actually.  I'm not overly fussed
> about the ease of editing: it doesn't seem especially hard
> either way.  But nice diffs are definitely valuable.  Food for
> thought; thanks.

I find that diffs like

   for row in (
       (item_bar, details_bar),
       (item_foo, details_foo),
+     (item_baz, details_baz),
       ):
     do_something(row)

are much easier/faster to understand instead of

   for row in (
       (item_bar, details_bar),
-     (item_foo, details_foo)):
+     (item_foo, details_foo),
+     (item_baz, details_baz)):
     do_something(row)


-tkc






More information about the Python-list mailing list