[Python-ideas] [Python-Dev] Unicode minus sign in numeric conversions

Łukasz Langa lukasz at langa.pl
Sun Jun 9 18:47:15 CEST 2013

On 9 cze 2013, at 12:52, M.-A. Lemburg <mal at egenix.com> wrote:

> There's no support for interpretation of minus and plus signs,
> or decimal dots, except for the ASCII ones. Support for these
> would have to be added to number parsing code.
> Here's the code range for mathematical operators:
> http://www.unicode.org/charts/PDF/U2200.pdf

The reason I expect those to be handled properly is that they are totally unambiguous. Unless anyone can point me to a case where \N{MINUS SIGN} should not be treated as a (duh) minus sign, we should go and try to make life easier for our users by adopting at least a few of such characters. We can flesh out which ones in Issue 6632 if there's general agreement that we can. I believe we do.

More importantly, this is not a theoretical musing. Wikipedia started serving numerical data with \N{MINUS SIGN} instead of 0x2D, for instance on climate tables. I think we'll see increased usage of such characters in the wild.

Best regards,
Łukasz Langa

WWW: http://lukasz.langa.pl/
Twitter: @llanga
IRC: ambv on #python-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130609/2aab8b50/attachment.html>

More information about the Python-ideas mailing list