Daniel Stutzbach <dan...@stutzbachenterprises.com> added the comment:

The swap bodies technique has been used in list.sort for a long time, but users 
expect list.sort to mutate the list.

Even with a pure-Python implementation of sets, I would not expect __contains__ 
to be a mutating method (unless I have gone out of way to write an evil __eq__ 
or __hash__ function).

I grant you that I would not expect atomicity, but the example script does not 
assume atomicity.

----------

_______________________________________
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