![](https://secure.gravatar.com/avatar/3dd475b8aaa5292d74cb0c3f76c3f196.jpg?s=120&d=mm&r=g)
Jan. 5, 2017
2:01 p.m.
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.