We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Py_BuildValue("p")
int
1 parent 6ab842f commit 6aa0826Copy full SHA for 6aa0826
Doc/c-api/arg.rst
@@ -686,6 +686,12 @@ Building values
686
``p`` (:class:`bool`) [int]
687
Convert a C :c:expr:`int` to a Python :class:`bool` object.
688
689
+ Be aware that this format requires an ``int`` argument.
690
+ Unlike most other contexts in C, variadic arguments are not coerced to
691
+ a suitable type automatically.
692
+ You can convert another type (for example, a pointer or a float) to a
693
+ suitable ``int`` value using ``(x) ? 1 : 0`` or ``!!x``.
694
+
695
.. versionadded:: 3.14
696
697
``c`` (:class:`bytes` of length 1) [char]
0 commit comments