(&self, vm: &VirtualMachine)
| 698 | } |
| 699 | |
| 700 | pub fn length(&self, vm: &VirtualMachine) -> PyResult<usize> { |
| 701 | self.length_opt(vm).ok_or_else(|| { |
| 702 | vm.new_type_error(format!( |
| 703 | "object of type '{}' has no len()", |
| 704 | self.class().name() |
| 705 | )) |
| 706 | })? |
| 707 | } |
| 708 | |
| 709 | pub fn get_item<K: DictKey + ?Sized>(&self, needle: &K, vm: &VirtualMachine) -> PyResult { |
| 710 | if let Some(dict) = self.downcast_ref_if_exact::<PyDict>(vm) { |
no test coverage detected