On Mon, Oct 14, 2019 at 9:09 AM Steven D'Aprano <st...@pearwood.info> wrote: > > 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.
I don't often actually want to add to list-or-set, but I do sometimes have half-written code using one or the other, and then a future design constraint makes me rethink my choice of data type. Oh, now I have to change how I'm adding those items. It'd be helpful to have the API more consistent, but I don't actually need it to be polymorphic per se. ChrisA _______________________________________________ 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/YM5BID46JANHQLRONWPKICBUDLKLA6KE/ Code of Conduct: http://python.org/psf/codeofconduct/