On 10/20/2019 03:06 PM, Guido van Rossum wrote:
So the choice is really only three way.


1) Add d1 + d2 and d1 += d2 (using similarity with list + and +=)
2) Add d1 | d2 and d1 |= d2 (similar to set | and |=)
3) Do nothing

In the end I'm +0.5 on | and |=, +0 on + and +=, and -0 on doing nothing.

One of the things I really enjoy about Python is its consistency:

- dicts and sets are both hash tables
- dicts and sets both disallow duplicates
- dicts and sets both use .update()

Adding '|' to dict to be consistent with '|' on sets seems a reasonable, and 
not a foolish, consistency.


+1 on '|' and '|='


--
~Ethan~
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/STVULVJ4V46UCY7Z3Q75TGQA5ILYDUCI/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to