Skip to content

Commit 8951088

Browse files
committed
Add support for unicode MINUS SIGN in int, float and complex
1 parent e66597d commit 8951088

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Objects/unicodeobject.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9475,6 +9475,9 @@ _PyUnicode_TransformDecimalAndSpaceToASCII(PyObject *unicode)
94759475
else if (Py_UNICODE_ISSPACE(ch)) {
94769476
out[i] = ' ';
94779477
}
9478+
else if (ch == 0x2212) { /* MINUS SIGN */
9479+
out[i] = '-';
9480+
}
94789481
else {
94799482
int decimal = Py_UNICODE_TODECIMAL(ch);
94809483
if (decimal < 0) {

0 commit comments

Comments
 (0)