(&self, vm: &VirtualMachine)
| 185 | |
| 186 | #[pymethod] |
| 187 | fn __length_hint__(&self, vm: &VirtualMachine) -> PyObjectRef { |
| 188 | let internal = self.internal.lock(); |
| 189 | if let IterStatus::Active(obj) = &internal.status { |
| 190 | let seq = obj.sequence_unchecked(); |
| 191 | seq.length(vm) |
| 192 | .map(|x| PyInt::from(x).into_pyobject(vm)) |
| 193 | .unwrap_or_else(|_| vm.ctx.not_implemented()) |
| 194 | } else { |
| 195 | PyInt::from(0).into_pyobject(vm) |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | #[pymethod] |
| 200 | fn __reduce__(&self, vm: &VirtualMachine) -> PyTupleRef { |
nothing calls this directly
no test coverage detected