[Python-ideas] Adding "+" and "+=" operators to dict
Ethan Furman
ethan at stoneleaf.us
Thu Feb 12 01:38:39 CET 2015
On 02/11/2015 04:27 AM, Donald Stufft wrote:
>
> I’d really like this change and I think that it makes sense. The only thing I’d change is that I think the | operator
> makes more sense than +. dicts are more like sets than they are like lists so a union operator makes more sense I think.
Maybe I'm just not steeped enough in CS, but when I want to combine two things together, my first reflex is always '+'.
I suppose I could come around to '|', though -- it does ease the tension around the behavior of duplicate keys.
--
~Ethan~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150211/757f65d4/attachment.sig>
More information about the Python-ideas
mailing list