Alexander Belopolsky added the comment:
It looks like we a approaching consensus on some points:
1. Mixed script numerals should be disallowed.
2. '\N{MINUS SIGN}' should be accepted as an alternative to '\N{HYPHEN-MINUS}'
Open question: should we accept fullwidth + and -, sub/superscript variants
etc.? I believe rather than debating variant codepoints one by one, we should
consider applying NFKC (compatibility) normalization to unicode strings to be
interpreted as numbers. This would allow parsing strings like this:
>>> float(normalize('NFKC', '\N{FULLWIDTH HYPHEN-MINUS}\N{DIGIT ONE FULL
>>> STOP}\N{FULLWIDTH DIGIT TWO}'))
-1.2
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10581>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com