Jurjen N.E. Bos added the comment:

Oops. That was a hard lesson: 1) don't haste when posting 2) always run what 
you post.

The point was the trick to define a custom __ne__ and not an __eq__ for an 
object (not for the container it is in!) so you can use "in" at full speed. Then
not all(map(ne, repeat(obj), container))
or
not all(map(obj.__ne__, container))
can be used if you really what to check for equality. This does make a 
difference in my case, where I only sometimes check for a non-identical object 
in the container, and I know when I do that.

----------

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

Reply via email to