Obsolesence of <> (fwd)
Aahz Maruch
aahz at panix.com
Fri Jun 1 01:29:56 EDT 2001
In article <mailman.991364942.15063.python-list at python.org>,
Lulu of the Lotus-Eaters <mertz at gnosis.cx> wrote:
>aahz at panix.com (Aahz Maruch) wrote:
>>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.
>>
>>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
Hrm. There was a thread a month or two back that I can't find about
list.sort() breaking in 2.0 because of a change in the way types were
implemented. I *thought* I remembered it being because of Unicode, but
I could be wrong.
--
--- Aahz <*> (Copyright 2001 by aahz at pobox.com)
Androgynous poly kinky vanilla queer het Pythonista http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6
"Characters exist to suffer, you know. An author needs a little sadism
in her makeup." --Brenda Clough
More information about the Python-list
mailing list