A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-May/044958.html below:

[Python-Dev] cmp(x,x)

[Python-Dev] cmp(x,x)Andrew Koenig ark-mlist at att.net
Tue May 25 12:07:09 EDT 2004
> IOW, we're still looking for a use case that warrants removing the
> identity-implies-equality guarantee out of Py_RichCompareBool().

I can think of two use cases:

	1) IEEE-like behavior.  Before you say that there is nothing wrong
with making floating-point comparison yield true for NaN==NaN, let me remind
you of the beast called "Signaling NaN", which should raise an exception on
any operation, including comparison.

	2) A class might have comparison operations that put trace
information in a log file for testing purposes.  Such a class might be
intended to help in testing searching algorithms, for example.  I think it
would be useful to be able to know whether x[i] is ever compared with x[i]
by putting appropriate tracing comparison operations in the elements of x.


More information about the Python-Dev mailing list

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