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

Method co_freevars

crates/vm/src/builtins/code.rs:852–861  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

850
851 #[pygetset]
852 pub fn co_freevars(&self, vm: &VirtualMachine) -> PyTupleRef {
853 let names = self
854 .code
855 .freevars
856 .deref()
857 .iter()
858 .map(|name| name.to_pyobject(vm))
859 .collect();
860 vm.ctx.new_tuple(names)
861 }
862
863 #[pygetset]
864 pub fn co_linetable(&self, vm: &VirtualMachine) -> crate::builtins::PyBytesRef {

Callers

nothing calls this directly

Calls 6

collectMethod · 0.80
mapMethod · 0.45
iterMethod · 0.45
derefMethod · 0.45
to_pyobjectMethod · 0.45
new_tupleMethod · 0.45

Tested by

no test coverage detected