Definitely want this functionality. I'd ultimately be happy with any of the top operator spellings, with tradeoffs:

    +      Is more obvious, especially to newcomers, consistent w. seq

    |      Is more accurate (None or '') --> '', consistent w. set

    <<     Could learn it easily and says "clobber" to me


The lossy-ness argument as a problem may slightly overstated. With the current + only the resulting copy might lose information. With += is it potentially lossy on the original, where it is expected that the operation will mutate somehow.

Believe as the PEP alludes, that most folks would expect a last-wins clobber (the most common use case), and for the folks that don't, one only has to try it once at the REPL to figure it out.

Personally, I'm leaning towards the spelling of "|" but would much rather have "+" than nothing.

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

Reply via email to