A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-December/040842.html below:

[Python-Dev] Re: test_unicode_file failing on Mac OS X

[Python-Dev] Re: test_unicode_file failing on Mac OS X [Python-Dev] Re: test_unicode_file failing on Mac OS XDavid Eppstein eppstein at ics.uci.edu
Tue Dec 9 12:06:03 EST 2003
In article <275ADB90-2A65-11D8-BACE-000A27B19B96 at cwi.nl>,
 Jack Jansen <Jack.Jansen at cwi.nl> wrote:

> > Could we perhaps use a comparison that, in effect, did:
> >
> >     def uni_equal(first, second):
> >         if first == second:
> >             return True
> >         return first.normalize() == second.normalize()
> >
> > That is, take advantage of the fact that normalization is often
> > unnecessary for "trivial" reasons.
> 
> It helps, but only in 50% of the comparisons:-)

One could imagine a test that also quickly shortcutted most of the 
unequal comparisons.

A possibly bigger problem with allowing a more general definition of 
equality for unicodes might be that it could be incompatible with the 
ordering given by < and <=.

-- 
David Eppstein                      http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4