[Python-Dev] Re: test_unicode_file failing on Mac OS X (original) (raw)
Scott David Daniels Scott.Daniels at Acm.Org
Wed Dec 10 08:28:46 EST 2003
- Previous message: [Python-Dev] Re: distributing modules
- Next message: [Python-Dev] Re: test_unicode_file failing on Mac OS X
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
-Scott David Daniels Scott.Daniels at Acm.Org
- Previous message: [Python-Dev] Re: distributing modules
- Next message: [Python-Dev] Re: test_unicode_file failing on Mac OS X
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]