[issue32077] Documentation: Some Unicode object functions don't indicate whether they return a new reference

New submission from Mathew M. <mathew1800@gmail.com>: This is just something I've noticed when browsing the C API documentation for Unicode objects. For example, the documentation entry for PyUnicode_DecodeMBCSStateful lacks the "Return value: New reference", etc. ---------- assignee: docs@python components: Documentation messages: 306516 nosy: Mathew M., docs@python priority: normal severity: normal status: open title: Documentation: Some Unicode object functions don't indicate whether they return a new reference type: enhancement _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32077> _______________________________________

Change by Mathew M. <mathew1800@gmail.com>: ---------- keywords: +patch pull_requests: +4407 stage: -> patch review _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32077> _______________________________________

Serhiy Storchaka <storchaka+cpython@gmail.com> added the comment: C API functions return new references by default. It needs to be explicitly documented only when the function returns a borrowed reference. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32077> _______________________________________

Serhiy Storchaka <storchaka+cpython@gmail.com> added the comment: Ah, you have changed just refcounts.dat! This is good. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32077> _______________________________________

Change by Mathew M. <mathew1800@gmail.com>: ---------- pull_requests: +10473 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32077> _______________________________________

Serhiy Storchaka <storchaka+cpython@gmail.com> added the comment: New changeset b2f642ccd2f65d2f3bf77bbaa103dd2bc2733734 by Serhiy Storchaka (Mat M) in branch 'master': bpo-32077: Update refcounts.dat for Unicode object functions. (GH-11243) https://github.com/python/cpython/commit/b2f642ccd2f65d2f3bf77bbaa103dd2bc27... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32077> _______________________________________

Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +10474 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32077> _______________________________________

Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +10475 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32077> _______________________________________

miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: New changeset 29d4e309b1b4dfb26d65d83c683002911c066dec by Miss Islington (bot) in branch '3.7': bpo-32077: Update refcounts.dat for Unicode object functions. (GH-11243) https://github.com/python/cpython/commit/29d4e309b1b4dfb26d65d83c683002911c0... ---------- nosy: +miss-islington _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32077> _______________________________________

Serhiy Storchaka <storchaka+cpython@gmail.com> added the comment: Sorry, I forget about this issue and remembered it only after creating similar patch from scratch. PR 11247 is what left from it after merging your patch. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32077> _______________________________________
participants (3)
-
Mathew M.
-
miss-islington
-
Serhiy Storchaka