(&self, needle: PyObjectRef, vm: &VirtualMachine)
| 392 | |
| 393 | #[pymethod] |
| 394 | fn count(&self, needle: PyObjectRef, vm: &VirtualMachine) -> PyResult<usize> { |
| 395 | let mut count: usize = 0; |
| 396 | for element in self { |
| 397 | if vm.identical_or_equal(element, &needle)? { |
| 398 | count += 1; |
| 399 | } |
| 400 | } |
| 401 | Ok(count) |
| 402 | } |
| 403 | |
| 404 | #[inline] |
| 405 | pub const fn __len__(&self) -> usize { |
nothing calls this directly
no test coverage detected