[docs] Document that PyUnicode_AsUTF8() returns a null-terminated string (issue 23088)

storchaka at gmail.com storchaka at gmail.com
Sat Mar 21 09:12:16 CET 2015

I can't make a decision about the patch for this issue, you should ask
other developer for the review. I can only make formal notes and ask

File Doc/c-api/bytes.rst (right):

Doc/c-api/bytes.rst:158: If *length* is *NULL*, the string may not
contain embedded null characters;
I think it is better to avoid words "string" (except may be a
combination "byte string") and "character" when say about the content of
a bytes object.

This documentation is mainly a copy of the documentation of Python 2
strings, and contains outdated and incorrect wording. It would be good
to fix this, but may be in other issue.

File Doc/c-api/unicode.rst (right):

Doc/c-api/unicode.rst:230: The returned buffer is always terminated with
an extra null character,
May be the wording used in PyUnicode_AsUnicode,
PyUnicode_AsUnicodeAndSize, and PyUnicode_AsWideCharString looks

Doc/c-api/unicode.rst:233: The *o* argument has to be a Unicode object
(not checked).
argument or parameter? What is correct?


More information about the docs mailing list