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

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

[Python-Dev] Re: Re: lists v. tuplesGreg Ewing greg@cosc.canterbury.ac.nz
Wed, 16 Apr 2003 13:11:34 +1200 (NZST)
> Yes, I know that -1 is a valid truth value.
> 
> So the first time you care is the first time f(x, y) returns nonzero.
> Now you can find out what kind of function f is by calling f(y, x).
> If f(y, x) returns zero, f is <.  Otherwise, it's a 3-way comparison.

I think the worry is that the function might be saying
"true" to both of these, but just happen to spell it
1 the first time and -1 the second.

Probably fairly unlikely, though...

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+



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