This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vernondcole
Recipients vernondcole
Date 2009-06-30.02:43:01
SpamBayes Score 2.220446e-16
Marked as misclassified No
Message-id <1246329784.46.0.00677223147699.issue6383@psf.upfronthosting.co.za>
In-reply-to
Content
I am making a demo program, a class which is a subset of int, which
implements a partial implementation of PEP313 (Roman numeral literals).

I discover that my conversion routines fail for values > 50000 due to an
error in unicodedata for the two code points 2187 and 2188. The return
value of unicodedata.numeric() for those two points should be 50,000.0
and 100,000.0 respectively. See the following console dump which
includes code point 2181 which works correctly.

----- console dump follows -----

c:\BZR\roman>c:\python26\python.exe
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import unicodedata
>>> unicodedata.name(u"\u2187")
'ROMAN NUMERAL FIFTY THOUSAND'
>>> unicodedata.numeric(u"\u2187")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: not a numeric character
>>> unicodedata.name(u"\u2188")
'ROMAN NUMERAL ONE HUNDRED THOUSAND'
>>> unicodedata.numeric(u"\u2188")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: not a numeric character
>>> unicodedata.name(u"\u2181")
'ROMAN NUMERAL FIVE THOUSAND'
>>> unicodedata.numeric(u"\u2181")
5000.0
>>>
History
Date User Action Args
2009-06-30 02:43:04vernondcolesetrecipients: + vernondcole
2009-06-30 02:43:04vernondcolesetmessageid: <1246329784.46.0.00677223147699.issue6383@psf.upfronthosting.co.za>
2009-06-30 02:43:02vernondcolelinkissue6383 messages
2009-06-30 02:43:01vernondcolecreate