Name
PyNumber_Power
Synopsis
PyObject* PyNumber_Power(PyObject*x
,PyObject*y
,PyObject*z
)
When z
is Py_None
,
returns x
raised to the
y
power, like Python’s
x
**
y
or equivalently
pow(
x,y
)
.
Otherwise, returns
x
**
y
%
z
,
like Python’s
pow(
x,y,z
)
.
The in-place version is named
PyNumber_InPlacePower
.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.