Carl Anderson added the comment:
>The proposal I like is for a unicode numeric normalization functions that
>return the ascii equivalent to exist.
@Gregory P. Smith
this makes sense to me. That does feel like the cleanest solution.
I'm currently doing s = s.replace("⁄",&
Carl Anderson added the comment:
>Carl: can you say more about the problem that motivated this issue?
@mark.dickinson
I was parsing a large corpus of ingredients strings from web-scraped recipes.
My code to interpret strings such as "1/2 cup sugar" would fall over every
Carl Anderson added the comment:
I guess if we are doing slashes, then the division sign ÷ (U+00F7) should be
included too.
There are at least 2 minus signs too (U+002D, U+02D7).
--
___
Python tracker
<https://bugs.python.org/issue43
Carl Anderson added the comment:
from https://en.wikipedia.org/wiki/Slash_(punctuation) there is
U+002F / SOLIDUS
U+2044 ⁄ FRACTION SLASH
U+2215 ∕ DIVISION SLASH
U+29F8 ⧸ BIG SOLIDUS
U+FF0F / FULLWIDTH SOLIDUS (fullwidth version of solidus)
U+1F67C VERY HEAVY SOLIDUS
In XML and HTML
New submission from Carl Anderson :
Fraction works with a regular slash:
>>> from fractions import Fraction
>>> Fraction("1/2")
Fraction(1, 2)
but there are other similar slashes such as (0x2044) in which it throws an
error:
>>> Fraction("0⁄2&q