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

Nick Coghlan ncoghlan at gmail.com
Mon Dec 13 14:25:58 CET 2010

On Mon, Dec 13, 2010 at 9:44 PM, Jan Kaliszewski <zuo at chopin.edu.pl> wrote:
> I think that seeing that:
>    def f(a, b): ...
>    def f(a, *, b): ...
>    def f(a, *args, b): ...
>    x(1, 2, 3, 4, z=5)
>    x(1, *(2,3,4), z=5)

As per the closure of the affected tickets, the likely outcome of such
a discussion would be the deprecation and subsequent removal of
support for the following two options:

    def f(a, b,): ...
    x(1, 2, 3, 4, z=5,): ...

Function arguments are not lists. Even when separated onto multiple
lines, the closing "):" should remain on the final line with other

That would be a lot of hassle to get rid of something that people
probably aren't doing in the first place, though.


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

More information about the Python-Dev mailing list