mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-45636: Simplify BINARY_OP (GH-29565)
This commit is contained in:
parent
55868f1a33
commit
6a84d61c55
4 changed files with 51 additions and 83 deletions
|
@ -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 */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue