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

Function path

crates/vm/src/stdlib/sys.rs:702–710  ·  view source on GitHub ↗
(vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

700
701 #[pyattr]
702 fn path(vm: &VirtualMachine) -> Vec<PyObjectRef> {
703 vm.state
704 .config
705 .paths
706 .module_search_paths
707 .iter()
708 .map(|path| vm.ctx.new_str(path.clone()).into())
709 .collect()
710 }
711
712 #[pyattr]
713 const fn path_hooks(_vm: &VirtualMachine) -> Vec<PyObjectRef> {

Callers

nothing calls this directly

Calls 5

collectMethod · 0.80
mapMethod · 0.45
iterMethod · 0.45
new_strMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected