On Sat, Mar 13, 2021 at 3:28 AM <[email protected]> wrote:
> For exmaple, if I have a multiline list like this:
>
>     x = [
>           1,
>           2
>         ]
>
> and add a new element to the end, then I end up with the diff including
> the 2 even though I didn't change the 2.  But if I had had a trailing
> comma, then the diff only shows the new entry.
>
> I see a lot of SQL with the commas at the beginnings of the lines
> (mostly, I think, due to SQL's syntax), but it solves the same problem.

Also in JSON, and for the same reason: the syntax disallows the
trailing comma. There is no reason to create the awkwardness if
trailing commas are accepted.

ChrisA
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/TS7P3FBU6ICLM3XYPC4J3JZEUH5X7Q5N/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to