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/2003-March/034075.html below:

[Python-Dev] Re: Re: lists v. tuples

[Python-Dev] Re: Re: lists v. tuples [Python-Dev] Re: Re: lists v. tuplesAndrew Koenig ark@research.att.com
15 Mar 2003 18:44:36 -0500
Guido> Yes.  And I'm still hoping to remove __cmp__; there should be
Guido> only one way to overload comparisons.

Moreover, for some data structures, the __cmp__ approach can be
expensive.  For example, if you're comparing sequences of any kind,
and you know that the comparison is for == or !=, you have your answer
immediately if the sequences differ in length.  If you don't know
what's being tested, as you wouldn't inside __cmp__, you may spend a
lot more time to obtain a result that will be thrown away.

-- 
Andrew Koenig, ark@research.att.com, http://www.research.att.com/info/ark



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