Obsolesence of <> (fwd)
Lulu of the Lotus-Eaters
mertz at gnosis.cx
Thu May 31 22:57:41 EDT 2001
Lulu of the Lotus-Eaters <mertz at gnosis.cx> wrote:
>I'm not really sure I like the change Alex points to. It makes
>something like the below fail:
>
> l = [(1+1j),(2-2j),Klass(),Klass(),Klass,5,4,3,'c','b','a']
> l.sort()
>
>Many of the comparisons have no particular meaning. But it is nice to have
>everything have some arbitrary inequality relation in order to create
>partial orderings on the subsets of things that really do have an order.
aahz at panix.com (Aahz Maruch) wrote:
|Yup, this used to work. Then came Unicode....
Huh? What does Unicode have to do with anything? The below works fine,
for example:
Python 2.0.42-S1.2.23 (#0, Apr 25 2001, 20:59:49) [GNU C/C++] on os2
Type "copyright", "credits" or "license" for more information.
>>> x = u"spam"
>>> y = "spam"
>>> z = 1+1j
>>> w = u"eggs"
>>> x < y
0
>>> x < z
0
>>> x < w
0
At least in my 2.0 version, unicode strings seem to compare fine to
other things (I didn't try *every* other thing... but the obvious few
are happy).
Yours, Lulu...
More information about the Python-list
mailing list