From: Benjamin Peterson Date: Tue, 21 Oct 2008 21:10:07 +0000 (+0000) Subject: document 'y(#)' format codes for Py_BuildValue X-Git-Tag: v3.0rc2~50 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ffc9479a41cdacb65937efbc1b60f39f6306c362;p=python document 'y(#)' format codes for Py_BuildValue --- diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst index c3d051a858..94f62f1328 100644 --- a/Doc/c-api/arg.rst +++ b/Doc/c-api/arg.rst @@ -424,6 +424,14 @@ and the following format units are left untouched. Convert a C string and its length to a Python object. If the C string pointer is *NULL*, the length is ignored and ``None`` is returned. + ``y`` (bytes) [char \*, int] + This converts a C string to a Python :func:`bytes` object. If the C + string pointer is *NULL*, ``None`` is returned. + + ``y#`` (bytes) [char \*, int] + This converts a C string and its lengths to a Python object. If the C + string pointer is *NULL*, ``None`` is returned. + ``z`` (string or ``None``) [char \*] Same as ``s``.