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

Method co_names

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

Source from the content-addressed store, hash-verified

810
811 #[pygetset]
812 fn co_names(&self, vm: &VirtualMachine) -> PyTupleRef {
813 let names = self
814 .code
815 .names
816 .deref()
817 .iter()
818 .map(|name| name.to_pyobject(vm))
819 .collect();
820 vm.ctx.new_tuple(names)
821 }
822
823 #[pygetset]
824 const fn co_flags(&self) -> u32 {

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