**Strongly** disagree. I would anticipate using this feature a LOT, and would 
be excited to see it added. (I would love to replace things like "d2 = 
d1.copy(); d2.update(d3)" with just "d2 = d1 | d3". In-place "d2 |= d3" is nice 
in its terseness, but isn't a huge benefit.)  But, I completely agree with the 
arguments in favor of using "|" from the semantic perspective of the operation 
being much more like a set operation, than a list operation.

Further: One angle I don't think I've read from anyone yet (still catching up 
on the thread tho) is the question of the obscurity of "|" vs the commonality 
of "+", and how they would likely interact with newcomers. A newcomer is likely 
going to use "+" a LOT, in all sorts of different situations. Given how 
non-intuitive dict merging can be, I would rather 'd1 + d2' throw a TypeError 
than return something unexpected. The more-obscure 'd1 | d2' is likely only 
going to be used by people who know how the machinery works and go searching 
for a more concise idiom, and who thus are less likely to be surprised by how 
it works.

-Brian
_______________________________________________
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/JXY3VH3UMVLOXRNDQNKDQDRIWJKISSEU/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to