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/040841.html below:

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

[Python-Dev] Re: test_unicode_file failing on Mac OS XJack Jansen Jack.Jansen at cwi.nl
Tue Dec 9 11:31:34 EST 2003
On 10-dec-03, at 14:28, Scott David Daniels wrote:

> martin at v.loewis.de (Martin v. L?wis) wrote:
>> David Eppstein <eppstein at ics.uci.edu> writes:
>>>> For the test, it would be best to compare normal forms, and have the
>>>> test pass if the normal forms (NFD) are equal.
>>> Shouldn't that be what happens in general for equality testing of 
>>> unicodes, not just for this test?
>> There was a BDFL pronouncement once that this should not be done
>> automatically, in general. Normalization is a very slow algorithm, and
>> it might not be meaningful in all cases.
>
> 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:-)
--
Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma 
Goldman


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