The int() function supports all Nd unicode digit variants so that int('\N{digit one}') == int('\N{arabic-indic digit one}').
Likewise, the int() function supports all Zs space character variants to that int('\N{space}123') == int('\N{no-break space}123').
However, the function does not support negation variants so that int('\N{hyphen-minus}\N{digit one}') succeeds while int('\N{minus sign}\N{digit one}') fails.
I found this issue while parsing a Table of Jacobi Symbol Values. All of the −1 entries are a MINUS SIGN and DIGIT ONE. I would have expected all minus sign variants to be supported.
Linked PRs
The
int()function supports allNdunicode digit variants so thatint('\N{digit one}') == int('\N{arabic-indic digit one}').Likewise, the
int()function supports allZsspace character variants to thatint('\N{space}123') == int('\N{no-break space}123').However, the function does not support negation variants so that
int('\N{hyphen-minus}\N{digit one}')succeeds whileint('\N{minus sign}\N{digit one}')fails.I found this issue while parsing a Table of Jacobi Symbol Values. All of the
−1entries are a MINUS SIGN and DIGIT ONE. I would have expected all minus sign variants to be supported.Linked PRs
int,floatandcomplex#144095