◐ Shell
clean mode source ↗

Add co_cellvars to code object by howjmay · Pull Request #4507 · RustPython/RustPython

Expand Up @@ -218,6 +218,18 @@ impl PyRef<PyCode> { self.code.source_path.to_owned() }
#[pygetset] pub fn co_cellvars(self, vm: &VirtualMachine) -> PyTupleRef { let cellvars = self .code .cellvars .deref() .iter() .map(|name| name.to_pyobject(vm)) .collect(); vm.ctx.new_tuple(cellvars) }
#[pygetset] fn co_firstlineno(self) -> usize { self.code.first_line_number Expand Down