comparing str's with ints
Andrew Dalke
dalke at dalkescientific.com
Wed May 1 21:39:33 EDT 2002
More information about the Python-list mailing list
Wed May 1 21:39:33 EDT 2002
- Previous message (by thread): comparing str's with ints
- Next message (by thread): Continuation after 100 header in httplib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Kragen:
I guess heterogeneous collections are no
>longer sortable. I guess that means complex numbers were added after
>== and > could raise exceptions.
Complex numbers were added a long time ago -- I think in '94 or
'95 (it was just when I was starting Python). They didn't raise
exceptions until Python 2.1 alpha 1. Here's the change info
] - Complex numbers use rich comparisons to define == and != but raise
] an exception for <, <=, > and >=. Unfortunately, this also means
] that cmp() of two complex numbers raises an exception when the two
] numbers differ. Since it is not mathematically meaningful to compare
] complex numbers except for equality, I hope that this doesn't break
] too much code.
Andrew
dalke at dalkescientific.com
- Previous message (by thread): comparing str's with ints
- Next message (by thread): Continuation after 100 header in httplib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list