[Zope-Coders] Re: BTrees, Unicode, and Python 2.2

Andreas Jung Andreas Jung" <andreas@zope.com
Thu, 18 Oct 2001 14:20:35 -0400


no, both strings are unicode strings. but my assumption was false.
unicode_compare() returns 0 but try_3way_compare() checks
for PyErr_Occured() after calling the comparison function
and then return -2. 

Andreas
----- Original Message ----- 
From: "Guido van Rossum" <guido@python.org>
To: "Andreas Jung" <andreas@zope.com>
Cc: <jeremy@zope.com>; <jim@zope.com>; <zope-coders@zope.org>
Sent: Thursday, October 18, 2001 14:10
Subject: Re: [Zope-Coders] Re: BTrees, Unicode, and Python 2.2


> > Jup, but the problem is in this case a Python problem. 
> > There must be a bug in the unicode_compare() code in unicodeobject.c.
> > because it returns of the testcase a wrong value to try_3way_compare()
> > for identical unicode strings.
> 
> Are you *sure* it's not comparing a Unicode string to an 8-bit string?
> 
> --Guido van Rossum (home page: http://www.python.org/~guido/)
>