> On Mon, May 24, 2004 at 12:40:21PM +1200, Greg Ewing wrote: > > What if the list contains a NaN? > > Uh, right. The whole issue with NaNs is muddy. Let's focus on Numeric as > a > much saner example of why you need 'a==a' to return something else than > True. More specifically, find a valid use case where bool(a==a) returns False (because Py_RichCompareBool() still does a boolean coercion on the result of a.__eq__(b)). For the use case to be compelling, it would need to justify breaking things like: mylist.append(x) assert x in mylist I don't believe that you will find sane examples. Identity-implying-equality is a useful and important invariant. Don't give it up easily. Raymond
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