On Thu, Jan 5, 2017, at 04:00, Matt Gilson wrote: > But, I think that the problem with adding `__hash__` to > collections.abc.Iterable is that not all iterables are immutable -- And > if > they aren't immutable, then allowing them to be hashed is likely to be a > pretty bad idea...
Why? This should never cause an interpreter-crashing bug, because user-defined types can have bad hash methods anyway. And without that, the reason for not applying the "consenting adults" principle and allowing people to add mutable objects to a *short-lived* dict without intending to change them while the dict is in use has never been clear to me. I think mutable types not having a hash method was a mistake in the first place. _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/