This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: PyLong_FromUnicodeObject document is wrong
Type: Stage: resolved
Components: Documentation Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, methane, miss-islington
Priority: normal Keywords: patch

Created on 2020-07-05 02:53 by methane, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 21325 merged methane, 2020-07-05 02:54
PR 21328 merged miss-islington, 2020-07-05 04:02
PR 21329 merged miss-islington, 2020-07-05 04:02
PR 21331 merged methane, 2020-07-05 04:14
PR 21332 merged miss-islington, 2020-07-05 05:28
Messages (6)
msg373009 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2020-07-05 02:53
```
.. 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.
msg373010 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2020-07-05 04:01
New changeset 9c8441712230660fedac818ed50e7cdd89e4c51d by Inada Naoki in branch 'master':
bpo-41211: Doc: Fix PyLong_FromUnicodeObject (GH-21325)
https://github.com/python/cpython/commit/9c8441712230660fedac818ed50e7cdd89e4c51d
msg373011 - (view) Author: miss-islington (miss-islington) Date: 2020-07-05 04:08
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/48f388f02f000fb9087a854c0dc77ce39bc2bb29
msg373012 - (view) Author: miss-islington (miss-islington) Date: 2020-07-05 04:09
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/4874e5908c38da4c7dcaecf6397832dda1e6dd08
msg373015 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2020-07-05 05:28
New changeset 16f451744b7f4653ca9db4b4bedbb6fc5c0de154 by Inada Naoki in branch '3.9':
bpo-41211: Doc: Fix PyLong_FromUnicode (GH-21331)
https://github.com/python/cpython/commit/16f451744b7f4653ca9db4b4bedbb6fc5c0de154
msg373016 - (view) Author: miss-islington (miss-islington) Date: 2020-07-05 05:36
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/01c0925271a9e8c6a4b316efeb8fdcbed9eb17f4
History
Date User Action Args
2022-04-11 14:59:33adminsetgithub: 85383
2020-07-05 05:38:57methanesetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-07-05 05:36:01miss-islingtonsetmessages: + msg373016
2020-07-05 05:28:52miss-islingtonsetpull_requests: + pull_request20482
2020-07-05 05:28:48methanesetmessages: + msg373015
2020-07-05 04:14:25methanesetpull_requests: + pull_request20481
2020-07-05 04:09:21miss-islingtonsetmessages: + msg373012
2020-07-05 04:08:42miss-islingtonsetmessages: + msg373011
2020-07-05 04:02:08miss-islingtonsetpull_requests: + pull_request20479
2020-07-05 04:02:01miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request20478
2020-07-05 04:01:51methanesetmessages: + msg373010
2020-07-05 02:54:51methanesetkeywords: + patch
stage: patch review
pull_requests: + pull_request20475
2020-07-05 02:53:03methanecreate