(&mut self, attr: String, value: PyObject)
| 17 | self.as_ref().len() |
| 18 | } |
| 19 | fn __setitem__(&mut self, attr: String, value: PyObject) -> PyResult<()> { |
| 20 | let gil = Python::acquire_gil(); |
| 21 | let py = gil.python(); |
| 22 | let data = to_data(py, value)?; |
| 23 | self.as_mut().insert(attr, data); |
| 24 | Ok(()) |
| 25 | } |
| 26 | |
| 27 | fn __getitem__(&self, attr: &str) -> PyResult<PyObject> { |
| 28 | let gil = Python::acquire_gil(); |