(&self, vm: &VirtualMachine)
| 169 | |
| 170 | #[pymethod] |
| 171 | fn copy(&self, vm: &VirtualMachine) -> Self { |
| 172 | // Deep copy the vars - clone the underlying Hamt data, not just the PyRef |
| 173 | let vars_copy = HamtObject { |
| 174 | hamt: RefCell::new(self.inner.vars.hamt.borrow().clone()), |
| 175 | }; |
| 176 | Self { |
| 177 | inner: ContextInner { |
| 178 | idx: Cell::new(usize::MAX), |
| 179 | vars: vars_copy.into_ref(&vm.ctx), |
| 180 | entered: Cell::new(false), |
| 181 | }, |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | fn __getitem__( |
| 186 | &self, |
no test coverage detected