Re: Adding "+" and "+=" operators to dict
[Posted March 4, 2015 by jake]
| From: |
| Ethan Furman <ethan-gcWI5d7PMXnvaiG9KC9N7Q-AT-public.gmane.org> |
| To: |
| python-ideas-+ZN9ApsXKcEdnm+yROfE0A-AT-public.gmane.org |
| Subject: |
| Re: Adding "+" and "+=" operators to dict |
| Date: |
| Wed, 11 Feb 2015 16:38:39 -0800 |
| Message-ID: |
| <54DBF60F.3000600@stoneleaf.us> |
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~
_______________________________________________
Python-ideas mailing list
Python-ideas-+ZN9ApsXKcEdnm+yROfE0A@public.gmane.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/