mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Accept Unicode legacy strings in the Decimal constructor.
This commit is contained in:
parent
6b0bdab429
commit
6e467049c6
2 changed files with 13 additions and 2 deletions
|
|
@ -1892,7 +1892,9 @@ numeric_as_ascii(const PyObject *u, int strip_ws)
|
|||
Py_ssize_t j, len;
|
||||
int d;
|
||||
|
||||
assert(PyUnicode_IS_READY(u));
|
||||
if (PyUnicode_READY(u) == -1) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
kind = PyUnicode_KIND(u);
|
||||
data = PyUnicode_DATA(u);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue