Re: Comparison of functions
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: Comparison of functions

From: Adriano Varoli Piazza <moranar@alice.it>
Date: Sat Jul 30 2005 - 18:18:56 CEST

Steven D'Aprano ha scritto:
> On Sat, 30 Jul 2005 13:30:20 +0000, Adriano Varoli Piazza wrote:
>
>
>>But tell me, how do you think sort works if not with <, >, ==, <= and >=
>>? I'm really interested.
>
>
> How do you sort words in a dictionary? Why does five come before four
> when the number five is larger than the number four? Why does hundred
> come before ten? What does it mean to say that elephant is less than
> mouse?
>
> When you can answer those questions, you will be enlightened.
>

>>> 'a' > 'A'
True
>>> 'a' > '-'
True
>>> 'a' > 'h'
False

Whiiiiii. I just discovered the Ascii table! wooot! (Your EBCDIC mileage
might vary)

What does it have to do with complex numbers, pray tell? and how do you
think any string sort works if not by comparing the numerical value of
each character?

Once more:

>>> 'five' < 'four'
True
>>> 'five' < 'Four'
False
>>> 'Five' < 'Four'
True

Ooohhh! magic of ascii!

-- 
Adriano Varoli Piazza
The Inside Out: http://moranar.com.ar
MSN: adrianomd@hotmail.com
ICQ: 4410132
Received on Thu Sep 29 17:15:47 2005