diff options
author | Brandt Bucher <brandt@python.org> | 2021-11-16 13:53:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-16 13:53:57 (GMT) |
commit | 6a84d61c55f2e543cf5fa84522d8781a795bba33 (patch) | |
tree | c4e9a81c004770c45f2bd5d7c6709d3056653941 /Objects/abstract.c | |
parent | 55868f1a335cd3853938082a5b25cfba66563135 (diff) | |
download | cpython-6a84d61c55f2e543cf5fa84522d8781a795bba33.zip cpython-6a84d61c55f2e543cf5fa84522d8781a795bba33.tar.gz cpython-6a84d61c55f2e543cf5fa84522d8781a795bba33.tar.bz2 |
bpo-45636: Simplify BINARY_OP (GH-29565)
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r-- | Objects/abstract.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index 6227ad5..82599dd 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -1152,6 +1152,12 @@ PyNumber_Power(PyObject *v, PyObject *w, PyObject *z) return ternary_op(v, w, z, NB_SLOT(nb_power), "** or pow()"); } +PyObject * +_PyNumber_PowerNoMod(PyObject *lhs, PyObject *rhs) +{ + return PyNumber_Power(lhs, rhs, Py_None); +} + /* Binary in-place operators */ /* The in-place operators are defined to fall back to the 'normal', @@ -1331,6 +1337,12 @@ PyNumber_InPlacePower(PyObject *v, PyObject *w, PyObject *z) NB_SLOT(nb_power), "**="); } +PyObject * +_PyNumber_InPlacePowerNoMod(PyObject *lhs, PyObject *rhs) +{ + return PyNumber_InPlacePower(lhs, rhs, Py_None); +} + /* Unary operators and functions */ |