On Wed, Dec 25, 2019, at 21:09, python-ideas--- via Python-ideas wrote: > On the contrary, on sets you can apply union *and* difference. And > since union seems the exact contrary of difference, it's illogical that > | is used instead of +.
But sets also support symmetric difference ^, and intersection &. All the bitwise operators mean the same thing that they do for an integer imagined as a set of bit values. The use of - for difference is the odd one out, and it's only this way because for bit notation it's spelled &~ and there's no ~ operator to make an "anti-set". _______________________________________________ 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/7VHUJBT26G37WIW2HFWO7UOMBIZAQXYF/ Code of Conduct: http://python.org/psf/codeofconduct/