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 belopolsky
Recipients belopolsky, eric.araujo, eric.smith, ezio.melotti, lemburg, mark.dickinson, skrah, vstinner
Date 2011-05-08.17:21:04
SpamBayes Score 4.4768844e-05
Marked as misclassified No
Message-id <BANLkTimGYi=P9fzBgU=uS-juXZ824Ei4bg@mail.gmail.com>
In-reply-to <1304781955.89.0.4988257693.issue10581@psf.upfronthosting.co.za>
Content
On Sat, May 7, 2011 at 11:25 AM, Éric Araujo <report@bugs.python.org> wrote:
> .. On one hand, I tend to agree that mixing Hindi/Arab numerals with Bengali does not make sense;
> on the other hand, rejecting it means that the int code does know about Unicode, which you argued
> against.

In order to flag use of mixed scripts in numerals, the code does not
require access to any additional unicode data.  Since Unicode 6.0.0,
programmers can rely on the following stability promise:

"""
Characters with the property value Numeric_Type=de (Decimal) only
occur in contiguous ranges of 10 characters, with ascending numeric
values from 0 to 9 (Numeric_Value=0..9).
"""  -- http://www.unicode.org/policies/stability_policy.html

Therefore, the validation code can simply check that for all digits in
the number, ord(d) - unicodedata.numeric(d) is the same.
History
Date User Action Args
2011-05-08 17:21:05belopolskysetrecipients: + belopolsky, lemburg, mark.dickinson, vstinner, eric.smith, ezio.melotti, eric.araujo, skrah
2011-05-08 17:21:04belopolskylinkissue10581 messages
2011-05-08 17:21:04belopolskycreate