mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Issue #10557: Fixed error messages from float() and other numeric
types. Added a new API function, PyUnicode_TransformDecimalToASCII(), which transforms non-ASCII decimal digits in a Unicode string to their ASCII equivalents.
This commit is contained in:
parent
36526bf3d9
commit
942af5a9a4
11 changed files with 169 additions and 52 deletions
|
|
@ -328,6 +328,13 @@ APIs:
|
|||
Identical to :c:func:`PyUnicode_FromFormat` except that it takes exactly two
|
||||
arguments.
|
||||
|
||||
.. c:function:: PyObject* PyUnicode_TransformDecimalToASCII(Py_UNICODE *s, Py_ssize_t size)
|
||||
|
||||
Create a Unicode object by replacing all decimal digits in
|
||||
:c:type:`Py_UNICODE` buffer of the given size by ASCII digits 0--9
|
||||
according to their decimal value. Return *NULL* if an exception
|
||||
occurs.
|
||||
|
||||
|
||||
.. c:function:: Py_UNICODE* PyUnicode_AsUnicode(PyObject *unicode)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue