(sent from my phone) On Apr 28, 2012 7:36 PM, "Chris Rebert" <c...@rebertia.com> wrote: > Correct. Pedantically, you can define __hash__() on mutable objects; > it's just not very useful or sensible, so people generally don't.
I find it's fine to define __hash__ on mutable objects as long as __eq__ only relies on immutable state (and then so should __hash__ of course). A typical example would be an object that does some caching. -- Arnaud
-- http://mail.python.org/mailman/listinfo/python-list