[Python-ideas] dictionary constructor should not allow duplicate keys

Ethan Furman ethan at stoneleaf.us
Wed May 4 02:32:04 EDT 2016

On 05/03/2016 09:18 PM, Random832 wrote:

> To play devil's advocate for a minute here...
> Why *don't* we allow duplicate keyword arguments in a function call,
> anyway? CALL_FUNCTION doesn't seem to actually care, if I create this
> situation by monkey-patching the calling function's consts to get
> duplicate keywords. All the arguments that have been raised here for
> *allowing* duplicate keyword arguments seem to apply just as well to
> f(**{'a': 1}, **{'a': 2})

Actually, I believe that is allowed now, although I'm not sure how far 
it goes.


More information about the Python-ideas mailing list