classification
Title: repeated keyword arguments
Type: behavior Stage:
Components: Interpreter Core Versions: Python 3.0, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, gangesmaster, giampaolo.rodola, gvanrossum
Priority: critical Keywords: patch

Created on 2008-06-27 19:17 by gangesmaster, last changed 2008-07-01 19:35 by benjamin.peterson. This issue is now closed.

Files
File name Uploaded Description Edit
repeated_kwargs.patch benjamin.peterson, 2008-06-27 20:42
Messages (4)
msg68847 - (view) Author: ganges master (gangesmaster) Date: 2008-06-27 19:17
under python 2.5 (and possibly 2.6 beta), the following code runs
successfully:

>>> def f(**kwargs):
...     print kwargs
...
>>> f(a=5,b=7,a=8)
{'a': 8, 'b': 7}

while in python 2.4, it fails as expected (complaining that "a" is given
twice")

http://mail.python.org/pipermail/python-dev/2008-June/080782.html
msg68852 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-06-27 20:42
The attached patch gives a SyntaxError.
msg68862 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2008-06-27 22:57
Don't do this for 2.5 please.
msg69059 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-07-01 19:35
Done for 2.6 in r64622. (Georg reviewed.)
History
Date User Action Args
2008-07-01 19:35:30benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg69059
2008-06-27 22:57:26gvanrossumsetnosy: + gvanrossum
messages: + msg68862
versions: + Python 3.0, - Python 2.5
2008-06-27 20:42:25benjamin.petersonsetpriority: critical
files: + repeated_kwargs.patch
messages: + msg68852
keywords: + patch
nosy: + benjamin.peterson
2008-06-27 19:35:25giampaolo.rodolasetnosy: + giampaolo.rodola
2008-06-27 19:17:45gangesmastercreate