[issue41211] PyLong_FromUnicodeObject document is wrong
New submission from Inada Naoki <songofacandy@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@python components: Documentation messages: 373009 nosy: docs@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@bugs.python.org> <https://bugs.python.org/issue41211> _______________________________________
Change by Inada Naoki <songofacandy@gmail.com>: ---------- keywords: +patch pull_requests: +20475 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21325 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue41211> _______________________________________
Inada Naoki <songofacandy@gmail.com> added the comment: New changeset 9c8441712230660fedac818ed50e7cdd89e4c51d by Inada Naoki in branch 'master': bpo-41211: Doc: Fix PyLong_FromUnicodeObject (GH-21325) https://github.com/python/cpython/commit/9c8441712230660fedac818ed50e7cdd89e... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue41211> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +20478 pull_request: https://github.com/python/cpython/pull/21328 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue41211> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +20479 pull_request: https://github.com/python/cpython/pull/21329 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue41211> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: New changeset 48f388f02f000fb9087a854c0dc77ce39bc2bb29 by Miss Islington (bot) in branch '3.9': bpo-41211: Doc: Fix PyLong_FromUnicodeObject (GH-21325) https://github.com/python/cpython/commit/48f388f02f000fb9087a854c0dc77ce39bc... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue41211> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: New changeset 4874e5908c38da4c7dcaecf6397832dda1e6dd08 by Miss Islington (bot) in branch '3.8': bpo-41211: Doc: Fix PyLong_FromUnicodeObject (GH-21325) https://github.com/python/cpython/commit/4874e5908c38da4c7dcaecf6397832dda1e... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue41211> _______________________________________
Change by Inada Naoki <songofacandy@gmail.com>: ---------- pull_requests: +20481 pull_request: https://github.com/python/cpython/pull/21331 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue41211> _______________________________________
Inada Naoki <songofacandy@gmail.com> added the comment: New changeset 16f451744b7f4653ca9db4b4bedbb6fc5c0de154 by Inada Naoki in branch '3.9': bpo-41211: Doc: Fix PyLong_FromUnicode (GH-21331) https://github.com/python/cpython/commit/16f451744b7f4653ca9db4b4bedbb6fc5c0... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue41211> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +20482 pull_request: https://github.com/python/cpython/pull/21332 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue41211> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: New changeset 01c0925271a9e8c6a4b316efeb8fdcbed9eb17f4 by Miss Islington (bot) in branch '3.8': bpo-41211: Doc: Fix PyLong_FromUnicode (GH-21331) https://github.com/python/cpython/commit/01c0925271a9e8c6a4b316efeb8fdcbed9e... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue41211> _______________________________________
Change by Inada Naoki <songofacandy@gmail.com>: ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue41211> _______________________________________
participants (2)
-
Inada Naoki
-
miss-islington