MCPcopy Index your code
hub / github.com/RustPython/RustPython / general_op

Method general_op

crates/vm/src/builtins/int.rs:367–376  ·  view source on GitHub ↗
(&self, other: PyObjectRef, op: F, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

365
366 #[inline]
367 fn general_op<F>(&self, other: PyObjectRef, op: F, vm: &VirtualMachine) -> PyResult
368 where
369 F: Fn(&BigInt, &BigInt) -> PyResult,
370 {
371 if let Some(other) = other.downcast_ref::<Self>() {
372 op(&self.value, &other.value)
373 } else {
374 Ok(vm.ctx.not_implemented())
375 }
376 }
377}
378
379#[pyclass(

Callers 2

modpowMethod · 0.80
int.rsFile · 0.80

Calls 1

not_implementedMethod · 0.45

Tested by

no test coverage detected