Title: function(**dict) does not accept comma after dict (inside parenthese)
Type: Stage: resolved
Components: Versions: Python 3.4
Status: closed Resolution: duplicate
Dependencies: Superseder: Allow trailing comma in any function argument list.
View: 9232
Assigned To: Nosy List: gstarck, r.david.murray
Priority: normal Keywords:

Created on 2015-07-09 20:30 by gstarck, last changed 2015-07-09 21:01 by r.david.murray. This issue is now closed.

Messages (2)
msg246525 - (view) Author: Grégory Starck (gstarck) * Date: 2015-07-09 20:30
Consider following:

Python 3.4.0 (default, Jun 19 2015, 14:20:21) 
[GCC 4.8.2] on linux

>>> def f(**kw): pass

>>> f(a=1 , )
>>> # ok

>>> f(**{'a': 1} )
>>> # ok

>>> # but :

>>> f(**{'a': 1} , )
SyntaxError: invalid syntax

shouldn't the last form be also allowed as is the first one ??

if it is: Could I personnaly handle this fix ? I'd be very proud to bring (even such a low impact problem) my own stone to Python :)

Kind regards.
msg246527 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2015-07-09 21:01
This is a duplicate of issue 9232, which has a patch.  The question is getting agreement to apply sounds like your service in this regard could be bringing it up on python-ideas; please read that issue through and see if you agree.
Date User Action Args
2015-07-09 21:01:09r.david.murraysetstatus: open -> closed

superseder: Allow trailing comma in any function argument list.

nosy: + r.david.murray
messages: + msg246527
resolution: duplicate
stage: resolved
2015-07-09 20:30:21gstarckcreate