Author Drekin
Recipients Drekin, Trundle, belopolsky, eric.smith, g.starck@gmail.com, larry, loewis, mark.dickinson, martin.panter, ncoghlan, pconnell, rhettinger, zuo
Date 2015-07-21.13:13:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1437484436.74.0.108195837858.issue9232@psf.upfronthosting.co.za>
In-reply-to
Content
Reposting from from my newest duplicate of this issue (Issue 24677), which is now closed:

I think that a trailing comma in function definition should be allowed also after *. 

Current situation with definitions:
def f(*args, ): pass # SyntaxError
def f(*, ): pass # SyntaxError
def f(*, a, ): pass # SyntaxError
def f(*, a=2, ): pass # SyntaxError

def f(a, ): pass # Ok
def f(, ): pass # SyntaxError – this should probably stay error

Corresponding calls:
f(*args, ) # Ok
f(*args, a, ) # Ok
f(*args, a=2, ) # Ok 

f(a, ) # Ok
f(, ) # SyntaxError – this is why the corresponding def behavior should stay

My use case:
def f(*, 
        long = 1, 
        list = 2, 
        of = 3, 
        kwonly = 4, 
        parameters = 5, 
    ):
    ...
History
Date User Action Args
2015-07-21 13:13:57Drekinsetrecipients: + Drekin, loewis, rhettinger, mark.dickinson, ncoghlan, belopolsky, larry, eric.smith, zuo, Trundle, g.starck@gmail.com, martin.panter, pconnell
2015-07-21 13:13:56Drekinsetmessageid: <1437484436.74.0.108195837858.issue9232@psf.upfronthosting.co.za>
2015-07-21 13:13:56Drekinlinkissue9232 messages
2015-07-21 13:13:56Drekincreate