[Python-ideas] [Python-Dev] hello, new dict addition for new eve ?

Devin Jeanpierre jeanpierreda at gmail.com
Sun Jan 1 09:40:01 CET 2012


On Sun, Jan 1, 2012 at 3:24 AM, Terry Reedy <tjreedy at udel.edu> wrote:
> You mean like dict.update?

Nah nah, that's "+= "; "+" is dict(d1, **d2).

-- Devin

On Sun, Jan 1, 2012 at 3:24 AM, Terry Reedy <tjreedy at udel.edu> wrote:
> On 12/31/2011 5:57 PM, Nathan Schneider wrote:
>
>> The necessary resolution of key conflicts is what makes "+" feel less
>> natural to me for dicts than it does for sequences, where the order of
>> the operands is transparently reflected in the output. For dicts, in
>> contrast, we are talking about a "lossy" union/combination where what
>> is lost depends on the order of the operands—this is less transparent
>> in the output. However it is spelled, though, I would be thrilled if
>> such an operation were built in. :)
>
>
> You mean like dict.update?
>
>
> --
> Terry Jan Reedy
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas



More information about the Python-ideas mailing list