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

Method run_block_expr

crates/vm/src/vm/python_run.rs:47–52  ·  view source on GitHub ↗
(&self, scope: Scope, source: &str)

Source from the content-addressed store, hash-verified

45 }
46
47 pub fn run_block_expr(&self, scope: Scope, source: &str) -> PyResult {
48 let code_obj = self
49 .compile(source, compiler::Mode::BlockExpr, "<embedded>".to_owned())
50 .map_err(|err| self.new_syntax_error(&err, Some(source)))?;
51 self.run_code_obj(code_obj, scope)
52 }
53}
54
55#[cfg(feature = "host_env")]

Callers 2

evalFunction · 0.80
py_mainFunction · 0.80

Calls 5

new_syntax_errorMethod · 0.80
run_code_objMethod · 0.80
SomeClass · 0.50
compileMethod · 0.45
to_ownedMethod · 0.45

Tested by

no test coverage detected