[Python-Dev] A grammatical oddity: trailing commas in argument lists -- continuation

Nick Coghlan ncoghlan at gmail.com
Mon Dec 13 14:54:28 CET 2010

On Mon, Dec 13, 2010 at 11:42 PM, Tres Seaver <tseaver at palladion.com> wrote:
> I actually make use of the feature when dealing with APIs which both a)
> take lots of arguments (more than fit comfortably on two lines at
> whatever indentation they are called), and b) have optional trailing
> arguments:  I always leave the trailing comma in place in such cases,
> with the closing paren on the following line, so that adding or removing
> an argument at the end of the list stays consistent (the diffs are
> better, too, when I use this pattern).

My personal preferences aren't strong either way, but the issues were
closed because committers voiced opinions against making this
consistent in the other direction (i.e. always allowing the trailing

I don't know that a full PEP is really needed, but the status quo is
that some committers said no and others don't really care about the
issue all that much, so the current behaviour is going to remain in
place unless those in the first group change their mind (or Guido
weighs in and says "change it"). Creating a PEP is one way to carry
out such persuasion (probably overkill though).


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-Dev mailing list