(zelf: PyRef<Self>, iterable: Self::Args, vm: &VirtualMachine)
| 473 | type Args = OptionalArg<PyObjectRef>; |
| 474 | |
| 475 | fn init(zelf: PyRef<Self>, iterable: Self::Args, vm: &VirtualMachine) -> PyResult<()> { |
| 476 | let mut elements = if let OptionalArg::Present(iterable) = iterable { |
| 477 | iterable.try_to_value(vm)? |
| 478 | } else { |
| 479 | vec![] |
| 480 | }; |
| 481 | core::mem::swap(zelf.borrow_vec_mut().deref_mut(), &mut elements); |
| 482 | Ok(()) |
| 483 | } |
| 484 | } |
| 485 | |
| 486 | impl AsMapping for PyList { |
nothing calls this directly
no test coverage detected