[Python-ideas] Dict joining using + and +=

Guido van Rossum guido at python.org
Tue Mar 5 21:25:39 EST 2019


On Tue, Mar 5, 2019 at 6:07 PM Raymond Hettinger <
raymond.hettinger at gmail.com> wrote:

>
> > On Mar 5, 2019, at 2:13 PM, Greg Ewing <greg.ewing at canterbury.ac.nz>
> wrote:
> >
> > Rhodri James wrote:
> >> I have to go and look in the documentation because I expect the union
> operator to be '+'.
> >
> > Anyone raised on Pascal is likely to find + and * more
> > natural. Pascal doesn't have bitwise operators, so it
> > re-uses + and * for set operations. I like the economy
> > of this arrangement -- it's not as if there's any
> > other obvious meaning that + and * could have for sets.
>
> The language SETL (the language of sets) also uses + and * for set
> operations.¹
>

So the secret is out: Python inherits a lot from SETL, through ABC -- ABC
was heavily influenced by SETL.


> ¹ https://www.linuxjournal.com/article/6805
> ² https://www.python.org/dev/peps/pep-0218/
>

-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20190305/7a6cc4ef/attachment-0001.html>


More information about the Python-ideas mailing list