Antoine Pitrou <pit...@free.fr> added the comment: > The test case in cycle.py tricks set into accepting mutable objects by > > creating a class with default __hash__. This falls into a category of > > "don't do it".
I beg to differ. There is a reason we allow people to define __hash__ and that's to define arbitrary hashable types (not only immutable ones). Furthermore, the default __hash__ (equivalent to id()) is also perfectly useful in some cases. And in object-oriented designs it is very common to have reference cycles. ---------- nosy: +pitrou _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9269> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com