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 lemburg
Recipients belopolsky, eric.smith, ezio.melotti, lemburg, mark.dickinson, skrah, vstinner
Date 2010-11-28.18:01:45
SpamBayes Score 2.8037833e-10
Marked as misclassified No
Message-id <4CF29908.40007@egenix.com>
In-reply-to <1290963609.51.0.300256939956.issue10557@psf.upfronthosting.co.za>
Content
Mark Dickinson wrote:
> 
> Mark Dickinson <dickinsm@gmail.com> added the comment:
> 
> About Alexander's solution:  might it make more sense to have PyUnicode_EncodeDecimal raise for inputs like this?  I see it as PyUnicode_EncodeDecimal's job to turn the unicode input into usable ASCII (or raise an exception);  it looks like that's not happening here.
> 
> Adding MAL to the nosy in case he wants to comment on this.

The purpose of the PyUnicode_EncodeDecimal() API is to convert
Unicode decimal digits to ASCII digits for interpretation by
the other usual functions to convert the ASCII representation to
numbers.

The proposed patch will not work, since it removes the support for
non-ASCII number code points, e.g. Asian number code points.

You might want to replace the error message by something more
related to floats in the float constructor. Note that UnicodeErrors
are subclasses of ValueErrors, so the errors are not unexpected
for number constructors.
History
Date User Action Args
2010-11-28 18:01:47lemburgsetrecipients: + lemburg, mark.dickinson, belopolsky, vstinner, eric.smith, ezio.melotti, skrah
2010-11-28 18:01:45lemburglinkissue10557 messages
2010-11-28 18:01:45lemburgcreate