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

Glenn Linderman v+python at g.nevcal.com
Sat Dec 18 23:41:09 CET 2010

On 12/18/2010 1:04 PM, Georg Brandl wrote:
> Am 13.12.2010 21:08, schrieb Glenn Linderman:
>> On 12/13/2010 11:39 AM, Mark Dickinson wrote:
>>> my_thing = Thing(
>>>       foo = Foo(arg1, arg2, ...),
>>>       bar = Bar(arg3, arg4, ...),
>>>       ...
>>> )
>>> and I've found the trailing comma very convenient during refactoring
>>> and API experimentation.  (There's still good fun to be had arguing
>>> about the indentation of that closing parenthesis, though.)
>> Clearly it needs to be indented one level, because it is a continuation
>> of the prior line, just like the foo and bar and ... lines are
>> continuations and therefore indented.
> Clearly Emacs is superior to Vim because (insert some random fact here).

Sure you have that right.

> Clearly the only thing that is clear about coding style details (even if
> we all more or less agree on PEP 8) is that it is a matter of personal
> taste.
And this too.

But apparently you missed the fact that Mark wanted some good fun 
arguing about the indentation of the closing parenthesis... and didn't 
quote my "Enjoy!" that implied that that was all I was giving him.

But then, you are release manager, which would make it very difficult, 
but hopefully you can still have a Merry Christmas! (or whatever 
end-of-year holiday suits your fancy)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20101218/e8abfd5a/attachment.html>

More information about the Python-Dev mailing list