On Sun, Oct 13, 2019 at 07:20:29PM -0000, Steve Jorgensen wrote: > Failing fast is good, but it is also a very common case to want to add > an item to a collection regardless of whether it is set-like or > sequence-like.
Is that correct though? To the best of my memory, I've never wanted to add an item to a list-or-set in 15 years, nor have I seen code in practice that does so. I don't think it is "very common", but I would like to see some examples of your code, and third-party libraries, which do this. The problem is that lists are sequences, and sets are not. Sequences are not very set-like, and sets are not very list-like. We even use different terminology to describe their contents: lists contain *items* while sets contain *elements*. So it isn't clear to me under what circumstances you would expect either one. I think that I will need to see some of these very common examples of wanting to add an element to a set-or-list before I can take this proposal too seriously. -- Steven _______________________________________________ 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/EUHPUWN4EZ254CNBDNGXJXIILUXLX2PG/ Code of Conduct: http://python.org/psf/codeofconduct/