On Tue, Nov 12, 2013, at 4:39, Frank-Rene Schäfer wrote:
> > All you've done is proven that you can subvert things. By fiddling
> > with __hash__, __eq__, and so on, you can make sets and dicts behave
> > very oddly. Means nothing.
> 
> To the contrary, it means everything about what 'isimmutable' could
> contribute: security against advert or inadvert insertion of mutable
> objects.

If an object can lie about its hashability, it can lie to your function
too... unless you don't intend to provide a way for a _genuinely_
immutable class to say so.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to