On Mon, Oct 21, 2019 at 7:07 AM Guido van Rossum <[email protected]> wrote: > > So the choice is really only three way. > > So if we want to cater to what most beginners will know, + and += would be > the best choice. But if we want to be more future-proof and consistent, | and > |= are best -- after all dicts are closer to sets (both are hash tables) than > to lists. (I know you can argue that dicts are closer to lists because both > support __getitem__ -- but I find that similarity shallower than the hash > table nature.) > > In the end I'm +0.5 on | and |=, +0 on + and +=, and -0 on doing nothing. >
If we choose `+`, `+` is now "merging two containers", not just "concatenate two sequences". So it looks very inconsistent that set uses `|` instead of `+`. This inconsistency looks very ugly to me. How do you feel about this? I think we should add + to set too. Regards, -- Inada Naoki <[email protected]> _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/AB7O4FM5RMCJ5HNYGXWDOLFFNCZY3JSL/ Code of Conduct: http://python.org/psf/codeofconduct/
