On 6/05/20 2:22 am, jdve...@gmail.com wrote:
However, if sets and frozensets are "are considered to be fundamentally the same kind of thing differentiated by mutability", as you said, why not tuples and lists?
I think that can be answered by looking at the mathematical heritage of the types involved: Python Mathematics ------ ----------- set set frozenset set tuple tuple list sequence Sets and frozensets are both modelled after mathematical sets, so to me at least it's not surprising that they behave very similarly, and are interchangeable for many purposes. To a mathematician, however, tuples and sequences are very different things. Python treating tuples as sequences is a "practicality beats purity" kind of thing, not to be expected from a mathematical point of view. -- Greg _______________________________________________ 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/NZS54CXQ4NMJLNZJZDUERSM2W5XVK3N7/ Code of Conduct: http://python.org/psf/codeofconduct/