Gath-Gealaich <gathgeala...@gmail.com> added the comment: I have found this in Python 3.1.2 documentation:
"Note, the elem argument to the __contains__(), remove(), and discard() methods may be a set. To support searching for an equivalent frozenset, the elem set is temporarily mutated during the search and then restored. During the search, the elem set should not be read or mutated since it does not have a meaningful value." I seems to me that this is precisely what happens in this code. Now we might argue whether this is an acceptable state of affairs, but at least it's a documented behavior (and people shouldn't write equality predicates like this anyway. ;)). ---------- nosy: +ggeal _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8435> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com