Author realead
Recipients docs@python, realead
Date 2018-06-02.21:10:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1527973856.37.0.592728768989.issue33740@psf.upfronthosting.co.za>
In-reply-to
Content
The C-API for Python2.7 https://docs.python.org/2/c-api/bytearray.html#c.PyByteArray_AsString

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: https://docs.python.org/3/c-api/bytearray.html#c.PyByteArray_AsString

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 https://github.com/python/cpython/commit/0a560a11af0ccc816d1172180f44e5afb34ba600 could be integrated in Python2.7
History
Date User Action Args
2018-06-02 21:10:56realeadsetrecipients: + realead, docs@python
2018-06-02 21:10:56realeadsetmessageid: <1527973856.37.0.592728768989.issue33740@psf.upfronthosting.co.za>
2018-06-02 21:10:56realeadlinkissue33740 messages
2018-06-02 21:10:55realeadcreate