[Python-ideas] Non-boolean return from __contains__

Ian Bicking ianb at colorstudy.com
Mon Jul 26 05:01:32 CEST 2010

On Sun, Jul 25, 2010 at 7:01 PM, Raymond Hettinger <
raymond.hettinger at gmail.com> wrote:

> P.S.  With rich comparisons, we've lost basics assumptions
> like equality operations being reflexsive, symmetric, and
> transitive.   We should be cautioned by that experience
> and only go down that path again if there is a darned good reason.

Well, it's done, and this would simply complete that.  I don't see how
holding the line at __contains__ help anything; we've gone most of the way
down the path, and this just gets us a little further along (and, or, and
not still being an issue).

Also I don't think this affects reflexive/symmetric/transitive aspects of
equality, since any overloading allows that to happen, right?  Rich
comparisons affect other things.

I assume this would fall under the moratorium though?

Ian Bicking  |  http://blog.ianbicking.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20100725/13c672b0/attachment.html>

More information about the Python-ideas mailing list