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

Method derive

crates/vm/src/exception_group.rs:67–78  ·  view source on GitHub ↗
(
            zelf: PyRef<PyBaseException>,
            excs: PyObjectRef,
            vm: &VirtualMachine,
        )

Source from the content-addressed store, hash-verified

65
66 #[pymethod]
67 fn derive(
68 zelf: PyRef<PyBaseException>,
69 excs: PyObjectRef,
70 vm: &VirtualMachine,
71 ) -> PyResult {
72 let message = zelf.get_arg(0).unwrap_or_else(|| vm.ctx.new_str("").into());
73 vm.invoke_exception(
74 vm.ctx.exceptions.base_exception_group.to_owned(),
75 vec![message, excs],
76 )
77 .map(|e| e.into())
78 }
79
80 #[pymethod]
81 fn subgroup(

Callers

nothing calls this directly

Calls 5

invoke_exceptionMethod · 0.80
get_argMethod · 0.45
new_strMethod · 0.45
mapMethod · 0.45
to_ownedMethod · 0.45

Tested by

no test coverage detected