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

Method __ror__

crates/vm/src/builtins/dict.rs:487–495  ·  view source on GitHub ↗
(self, other: PyObjectRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

485 }
486
487 fn __ror__(self, other: PyObjectRef, vm: &VirtualMachine) -> PyResult {
488 let other_dict: Result<Self, _> = other.downcast();
489 if let Ok(other) = other_dict {
490 let other_cp = other.copy();
491 other_cp.merge_dict(self, vm)?;
492 return Ok(other_cp.into_pyobject(vm));
493 }
494 Ok(vm.ctx.not_implemented())
495 }
496}
497
498impl DefaultConstructor for PyDict {}

Callers

nothing calls this directly

Calls 5

downcastMethod · 0.80
copyMethod · 0.45
merge_dictMethod · 0.45
into_pyobjectMethod · 0.45
not_implementedMethod · 0.45

Tested by

no test coverage detected