On Fri, Dec 13, 2019, at 02:20, mental na via Python-Dev wrote: > Guido van Rossum wrote: > > This is most definitely a language issue, not just a CPython issue -- the > > rules around hashability and (im)mutability are due to the language > > definition, not the whim of an implementer. > > I was not aware of this, I assumed it was a implementation issue because > I knew CPython's dicts use a hash table implementation and there are other > ways to implement a mapping data structure i.e. via trees.
There are significant differences in semantics between a hash table and a tree-based mapping. Dict has to be a hash table on all implementations. (However, Java mutable types are hashable and the sky hasn't fallen for them.) > Guido could you provide a link to the language definition that dictates these > rules about hashability and (im)mutability? _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/KESFBWNUT2ISHH6ETR65PLWPLXSEFYA2/ Code of Conduct: http://python.org/psf/codeofconduct/