inPlacePower method

PyObject inPlacePower(
  1. PyObject exponent, [
  2. PyObject? modulus
])

python: a **= b; with modulus: a = pow(a, b, modulus) Python power, optionally with a modulus. An omitted modulus uses None.

Implementation

PyObject inPlacePower(PyObject exponent, [PyObject? modulus]) {
  modulus ??= .borrowedConst(.none);
  return .fromHandle(
    checked(() => api.PyNumber_InPlacePower(ptr, exponent.ptr, modulus!.ptr)),
  );
}