mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Issue #14705: Add 'p' format character to PyArg_ParseTuple* for bool support.
This commit is contained in:
parent
6b03f2ce45
commit
faf91e75ab
4 changed files with 62 additions and 0 deletions
|
@ -317,6 +317,15 @@ Other objects
|
|||
.. versionchanged:: 3.1
|
||||
``Py_CLEANUP_SUPPORTED`` was added.
|
||||
|
||||
``p`` (:class:`bool`) [int]
|
||||
Tests the value passed in for truth (a boolean **p**\redicate) and converts
|
||||
the result to its equivalent C true/false integer value.
|
||||
Sets the int to 1 if the expression was true and 0 if it was false.
|
||||
This accepts any valid Python value. See :ref:`truth` for more
|
||||
information about how Python tests values for truth.
|
||||
|
||||
.. versionchanged:: 3.3
|
||||
|
||||
``(items)`` (:class:`tuple`) [*matching-items*]
|
||||
The object must be a Python sequence whose length is the number of format units
|
||||
in *items*. The C arguments must correspond to the individual format units in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue