[Python-ideas] Adding rule about trailing comma.

Chris Angelico rosuav at gmail.com
Tue Mar 31 09:36:58 CEST 2015


On Tue, Mar 31, 2015 at 5:35 PM, INADA Naoki <songofacandy at gmail.com> wrote:
> What about adding rule about trailing comma?

My crystal ball tells me that you're possibly talking about PEP 8
rather than about actual language changes. Is that correct?

There's absolutely no need to put restrictions like this into the
language itself. If the trailing comma is permitted, it should be
permitted whether there's a newline after it or not.

In your own style guide, you're most welcome to advocate what you
will, without needing any approval from the Python core devs. If you
want to say, for instance, "we follow PEP 8, with the following
additional requirements", and then list your trailing comma rule and
any others you want to require, people will understand. Actually, most
people will do something like this, anyway.

ChrisA


More information about the Python-ideas mailing list