[issue41211] PyLong_FromUnicodeObject document is wrong
Inada Naoki
report at bugs.python.org
Sat Jul 4 22:53:03 EDT 2020
New submission from Inada Naoki <songofacandy at gmail.com>:
```
.. c:function:: PyObject* PyLong_FromUnicodeObject(PyObject *u, int base)
Convert a sequence of Unicode digits in the string *u* to a Python integer
value. The Unicode string is first encoded to a byte string using
:c:func:`PyUnicode_EncodeDecimal` and then converted using
:c:func:`PyLong_FromString`.
```
PyUnicode_EncodeDecimal is not used actually.
It uses private and undocumented `_PyUnicode_TransformDecimalAndSpaceToASCII` function instead.
The document of PyFloat_FromString() doesn't mention about how it convert unicode string to digits. Let's remove the second sentence.
----------
assignee: docs at python
components: Documentation
messages: 373009
nosy: docs at python, inada.naoki
priority: normal
severity: normal
status: open
title: PyLong_FromUnicodeObject document is wrong
versions: Python 3.10, Python 3.8, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41211>
_______________________________________
More information about the Python-bugs-list
mailing list