A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-June/080788.html below:

[Python-Dev] repeated keyword arguments

[Python-Dev] repeated keyword arguments [Python-Dev] repeated keyword argumentsScott Dial scott+python-dev at scottdial.com
Fri Jun 27 23:40:21 CEST 2008
David Wolever wrote:
> I don't have 2.4 handy to test it, but it is more likely that a keyword 
> and dictionary are passed, both containing the same item:
>  >>> f(a=3, **{'a': 4})
> 
> Would that be a potential risk?

Python 2.4.3
 >>> f(a=3, **{'a': 4})
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
TypeError: f() got multiple values for keyword argument 'a'

Python 2.5
 >>> f(a=3, **{'a': 4})
TypeError: f() got multiple values for keyword argument 'a'

The regression is purely in the way an argument list is reduced to a 
dictionary.

-- 
Scott Dial
scott at scottdial.com
scodial at cs.indiana.edu
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4