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

Created on 2018-06-02 21:10 by realead, last changed 2019-11-16 00:13 by BTaskaya.

Messages (2)
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 triager) Date: 2019-11-16 00:13
IMHO there is no need/way for adding that clarification after this date (1.5 months left).
Date User Action Args
2019-11-16 00:13:41BTaskayasetnosy: + benjamin.peterson, BTaskaya
messages: + msg356737
2018-06-02 21:10:56realeadcreate