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

Method binary_op

crates/vm/src/vm/vm_ops.rs:234–246  ·  view source on GitHub ↗
(
        &self,
        a: &PyObject,
        b: &PyObject,
        op_slot: PyNumberBinaryOp,
        op: &str,
    )

Source from the content-addressed store, hash-verified

232 }
233
234 pub fn binary_op(
235 &self,
236 a: &PyObject,
237 b: &PyObject,
238 op_slot: PyNumberBinaryOp,
239 op: &str,
240 ) -> PyResult {
241 let result = self.binary_op1(a, b, op_slot)?;
242 if !result.is(&self.ctx.not_implemented) {
243 return Ok(result);
244 }
245 Err(self.new_unsupported_bin_op_error(a, b, op))
246 }
247
248 /// Binary in-place operators
249 ///

Callers

nothing calls this directly

Calls 4

binary_op1Method · 0.80
isMethod · 0.80
ErrClass · 0.50

Tested by

no test coverage detected