[Python-Dev] Odd lines in unicodedata_db.h (original) (raw)

Guido van Rossum guido at python.org
Mon Apr 5 01:03:20 CEST 2010


On Sun, Apr 4, 2010 at 10:43 AM, MRAB <python at mrabarnett.plus.com> wrote:

Amaury Forgeot d'Arc wrote:

2010/4/4 MRAB <python at mrabarnett.plus.com>:

I've just downloaded the daily snapshot at http://svn.python.org/snapshots/python.tar.bz2 In the header file /python/Modules/unicodedatadb.h, there are the following lines in the changerecords320 struct: { 255, 255, 255, 255, 1.0 }, { 255, 255, 255, 255, 2.0 }, { 255, 255, 255, 255, 3.0 }, { 255, 255, 255, 255, 4.0 }, ... { 255, 255, 255, 255, 1e+16 }, { 255, 255, 255, 255, 1e+20 }, Looks like a bug to me. I don't think so. Unicode 3.2 did contain two entries with large numeric values. The file Unihan-3.2.0.txt contains these two lines: U+4EAC  kPrimaryNumeric 10,000,000,000,000,000 ten quadrillion (American) U+5793  kPrimaryNumeric 100,000,000,000,000,000,000 hundred quintillion (American) For some reason newer versions of the unicode standard removed these values. It causes a type warning: warning C4244: 'initializing' : conversion from 'double' to 'const int', possible loss of data

The numeric_changed field isn't used anywhere in the code AFAIK, so I don't see why we need to preserve them.

-- --Guido van Rossum (python.org/~guido)



More information about the Python-Dev mailing list