mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
document 'y(#)' format codes for Py_BuildValue
This commit is contained in:
parent
3851d12f82
commit
ffc9479a41
1 changed files with 8 additions and 0 deletions
|
|
@ -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``.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue