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/044934.html below:

[Python-Dev] cmp(x,x)

[Python-Dev] cmp(x,x)Gustavo Niemeyer niemeyer at conectiva.com
Fri May 21 13:36:54 EDT 2004
Hello again Armin,

> > Performance is certainly a legitimate concern.
> 
> Ok, then the current situation looks like the best one.  I suggest we
> just drop a note in the documentation saying that if there are objects
> for which x.__eq__(x) isn't necessarily true, you shouldn't expect
> them to be handled in a fully consistent way.

Is it true that the current list comparison algorithm
goes trough every element doing identity comparison, and
if every element in the first list *is* the element at
the same position in the second list, and the list has
the same size, then lists are considered equal?

If that's true, then I belive there's no reason for
not comparing if the first list *is* the second list at
the top of list_richcompare(), right?

-- 
Gustavo Niemeyer
http://niemeyer.net

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