summaryrefslogtreecommitdiff
path: root/Python/bltinmodule.c
diff options
context:
space:
mode:
authorAmmar Askar <ammar@ammaraskar.com>2019-09-21 00:28:49 -0400
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-09-20 21:28:49 -0700
commit87d6cd3604e5c83c06339276228139f5e040b0e7 (patch)
tree8625c8ec9abe6f81b425b742d9a8e0ab2785e4e3 /Python/bltinmodule.c
parente267793aa4101b2771ed0e66aaff5743d23f59af (diff)
downloadcpython-git-87d6cd3604e5c83c06339276228139f5e040b0e7.tar.gz
bpo-38237: Make pow's arguments have more descriptive names and be keyword passable (GH-16302)
Edit: `math.pow` changes removed on Mark's request. https://bugs.python.org/issue38237 Automerge-Triggered-By: @rhettinger
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r--Python/bltinmodule.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index a40eb421f5..31e7ad7658 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -1796,22 +1796,22 @@ builtin_ord(PyObject *module, PyObject *c)
/*[clinic input]
pow as builtin_pow
- x: object
- y: object
- z: object = None
- /
+ base: object
+ exp: object
+ mod: object = None
-Equivalent to x**y (with two arguments) or x**y % z (with three arguments)
+Equivalent to base**exp (with two arguments) or base**exp % mod (with three arguments)
Some types, such as ints, are able to use a more efficient algorithm when
invoked using the three argument form.
[clinic start generated code]*/
static PyObject *
-builtin_pow_impl(PyObject *module, PyObject *x, PyObject *y, PyObject *z)
-/*[clinic end generated code: output=50a14d5d130d404b input=653d57d38d41fc07]*/
+builtin_pow_impl(PyObject *module, PyObject *base, PyObject *exp,
+ PyObject *mod)
+/*[clinic end generated code: output=3ca1538221bbf15f input=bd72d0a0ec8e5eb5]*/
{
- return PyNumber_Power(x, y, z);
+ return PyNumber_Power(base, exp, mod);
}