summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/arg.rst
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-10-21 21:10:07 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-10-21 21:10:07 (GMT)
commitffc9479a41cdacb65937efbc1b60f39f6306c362 (patch)
tree599a57de43847fd7c35d0341dde83d013f073971 /Doc/c-api/arg.rst
parent3851d12f8258904fea2975e8e5b72bcf8413430b (diff)
downloadcpython-ffc9479a41cdacb65937efbc1b60f39f6306c362.zip
cpython-ffc9479a41cdacb65937efbc1b60f39f6306c362.tar.gz
cpython-ffc9479a41cdacb65937efbc1b60f39f6306c362.tar.bz2
document 'y(#)' format codes for Py_BuildValue
Diffstat (limited to 'Doc/c-api/arg.rst')
-rw-r--r--Doc/c-api/arg.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst
index c3d051a..94f62f1 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``.