We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf54a78 commit 529d223Copy full SHA for 529d223
vm/src/builtins/code.rs
@@ -218,6 +218,18 @@ impl PyRef<PyCode> {
218
self.code.source_path.to_owned()
219
}
220
221
+ #[pygetset]
222
+ pub fn co_cellvars(self, vm: &VirtualMachine) -> PyTupleRef {
223
+ let cellvars = self
224
+ .code
225
+ .cellvars
226
+ .deref()
227
+ .iter()
228
+ .map(|name| name.to_pyobject(vm))
229
+ .collect();
230
+ vm.ctx.new_tuple(cellvars)
231
+ }
232
+
233
#[pygetset]
234
fn co_firstlineno(self) -> usize {
235
self.code.first_line_number
0 commit comments