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

Method expect_pyresult

crates/vm/src/vm/vm_object.rs:92–97  ·  view source on GitHub ↗
(&self, result: PyResult<T>, msg: &str)

Source from the content-addressed store, hash-verified

90 }
91 #[track_caller]
92 pub fn expect_pyresult<T>(&self, result: PyResult<T>, msg: &str) -> T {
93 match result {
94 Ok(x) => x,
95 Err(exc) => self._py_panic_failed(exc, msg),
96 }
97 }
98
99 /// Test whether a python object is `None`.
100 pub fn is_none(&self, obj: &PyObject) -> bool {

Callers 3

initializeMethod · 0.80
fsdecodeMethod · 0.80
enter_and_expectMethod · 0.80

Calls 1

_py_panic_failedMethod · 0.80

Tested by

no test coverage detected