(&self, vm: &VirtualMachine)
| 956 | |
| 957 | #[pymethod] |
| 958 | fn tolist(&self, vm: &VirtualMachine) -> PyResult<Vec<PyObjectRef>> { |
| 959 | let array = self.read(); |
| 960 | let mut v = Vec::with_capacity(array.len()); |
| 961 | for obj in array.iter(vm) { |
| 962 | v.push(obj?); |
| 963 | } |
| 964 | Ok(v) |
| 965 | } |
| 966 | |
| 967 | #[pymethod] |
| 968 | fn fromlist(zelf: &Py<Self>, list: PyListRef, vm: &VirtualMachine) -> PyResult<()> { |