A suspected bug
Fredrik Lundh
fredrik at pythonware.com
Sun Feb 18 06:12:57 EST 2001
"Tim Peters wrote:
> I'd agree that's of marginal value, but that's the way it's always been, so
> it would break stuff if it changed. For example, sometimes I have giant
> lists of objects of all kinds of types, and can reliably sort the list to
> bring all the objects of the same type next to each other. It does have its
> charms.
except that it doesn't always work:
Python 2.0 (#8, Jan 29 2001, 22:28:01) on win32
>>> a = [u"foo", "bär"]
>>> a.sort()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
UnicodeError: ASCII decoding error: ordinal not in range(128)
not to mention:
Python 2.1a2 (#10, Feb 18 2001, 00:16:17) on win32
>>> a = [u"foo", "bär"]
>>> a.sort()
>>> a
UnicodeError: ASCII decoding error: ordinal not in range(128)
>>> a
['b\x84r', u'foo']
>>> a.sort()
>>> a = 10
UnicodeError: ASCII decoding error: ordinal not in range(128)
>>> a.sort()
>>> # hey, what's going on here?
...
UnicodeError: ASCII decoding error: ordinal not in range(128)
>>> quit
'Use Ctrl-Z plus Return to exit.'
(reboot)
Cheers /F
More information about the Python-list
mailing list