On Sun, Oct 13, 2019 at 05:42:21PM -0400, David Mertz wrote: > I have definitely hit this difficulty many times. The part of the code that > "just puts something in the collection" doesn't need to care conceptually > about the kind of collection. Taking the data back out somewhere else more > often needs to worry about order, efficiency, concurrency, etc.
And that's why I am skeptical that there is "very common" code that doesn't care about whether it has a list or a set. We surely almost always will care when we're taking the data out again, because of ordering and efficiency etc. If you require a set for the data-output side, why would you accept a list for the data-input side when you won't be able to use it further on? And vice versa. In the absense of any concrete examples demonstrating that this is useful, I think this is an over-generalisation of little practical use. -- 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/AYZ3XJIVQWGJ3L2FWYC5BAAYOKNDUPO2/ Code of Conduct: http://python.org/psf/codeofconduct/