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

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


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


> 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. 
> 

I am now checking the result of PyObject_Compare(). For 
the original version of the unittest PyErr_Occurred() returns
now a exceptions.UnicodeError instance. But when I replace
the unicode string in the test script with self.s then PyCompare()
returns 0 as expected.

Andreas