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.

Title: PyByteArray_AsString C-API description lacks the assurance, that the trailing null-byte is appended.
Type: Stage: resolved
Components: Documentation Versions: Python 2.7
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: docs@python Nosy List: BTaskaya, benjamin.peterson, docs@python, realead, serhiy.storchaka
Priority: normal Keywords:

Created on 2018-06-02 21:10 by realead, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (3)
msg318515 - (view) Author: (realead) Date: 2018-06-02 21:10
The C-API for Python2.7

lacks the sentence: "The returned array always has an extra null byte appended." which clarifies, that the returned C-string is null-terminated.

This sentence is a part of Python3-documentation:

I might be very wrong, but so far I understand the code this is the case for both versions, Python3 and Python2.

Probably parts of this change could be integrated in Python2.7
msg356737 - (view) Author: Batuhan Taskaya (BTaskaya) * (Python committer) Date: 2019-11-16 00:13
IMHO there is no need/way for adding that clarification after this date (1.5 months left).
msg370458 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-05-31 13:50
Python 2.7 is no longer supported.
Date User Action Args
2022-04-11 14:59:01adminsetgithub: 77921
2020-05-31 13:50:39serhiy.storchakasetstatus: open -> closed

nosy: + serhiy.storchaka
messages: + msg370458

resolution: out of date
stage: resolved
2019-11-16 00:13:41BTaskayasetnosy: + benjamin.peterson, BTaskaya
messages: + msg356737
2018-06-02 21:10:56realeadcreate