On 3/19/2010 12:50 PM, Mark Dickinson wrote: > Hah. This is a very good point, and one I'd somehow missed up until > now. I don't think we*can* reasonably make equality comparisons > raise NotImplemented (in either 2.x or 3.x), since that messes up > containment tests: something like "1.0 in {2, Decimal(3)}" would > raise a TypeError instead of correctly returning False. (So the patch > I've put on the issue tracker is wrong, since it does raise TypeError > for equality and inequality, as well as for<,>,<= and>=.) > Sounds to me like containment checking is wrong; that if it gets an exception during the comparison that it should assume unequal, rather than aborting, and continue to the next entry. Wouldn't the same issue arise for containment tests when disparate, incomparable objects are included in the same set? Why is this different? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20100319/486d0dbe/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4