Steven D'Aprano writes: > But unlike us, the equality operator only has a pinhole view of the > operands. It can't distinguish between your example and this: > > x = float('nan') > y = some_complex_calculation(x) > if x == y: > ... > > where y merely happens to end up with the same object as x by some quirk > of implementation. Note that Mark has already provided a related example of such a quirk (Decimal(-1).sqrt(), I think it was).
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