Raymond Hettinger <rhettin...@users.sourceforge.net> added the comment:

FWIW, the current docs adequately cover the existing situation:
"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."

That being said, I'm going to get rid of set_swap_bodies technique.  Instead, 
will use an atomic full-copy of the set into a separate frozenset.  That will 
cure the most egregious problems at the expense of some speed and of creating a 
new frozenset object that will be visible to a user determined to see it.

----------
versions:  -Python 2.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8757>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to