[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think we should stick the with forward slashes. That is what the rest of the language does. Adding more options is recipe for confusion. >>> 38 / 5 7.6 >>> 38 ∕ 5 SyntaxError: invalid character '∕' (U+2215) -- nosy: +rhettinger

[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Carl Anderson
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

[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Ezio Melotti
Change by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Carl Anderson
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, the

[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Mark Dickinson
Mark Dickinson added the comment: Related: #6632 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Mark Dickinson
Mark Dickinson added the comment: Seems worth noting that Unicode fractions like ⅔ produce a FRACTION SLASH character when normalized: >>> unicodedata.normalize('NFKC', '⅔') '2⁄3' >>> list(map(unicodedata.name, unicodedata.normalize('NFKC', '⅔'))) ['DIGIT TWO', 'FRACTION SLASH', 'DIGIT

[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Mark Dickinson
Mark Dickinson added the comment: There's a bigger issue here about what characters should be accepted in numeric literals. The Unicode minus sign (U+2212) "−" is also not currently accepted for Fractions or any other built-in numeric type. > but there are other similar slashes such as

[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Carl Anderson
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") Traceback (most recent call last): File "",