(&self, value: PyObjectRef, vm: &VirtualMachine)
| 1169 | } |
| 1170 | |
| 1171 | fn __contains__(&self, value: PyObjectRef, vm: &VirtualMachine) -> bool { |
| 1172 | let array = self.array.read(); |
| 1173 | for element in array |
| 1174 | .iter(vm) |
| 1175 | .map(|x| x.expect("Expected to be checked by array.len() and read lock.")) |
| 1176 | { |
| 1177 | if let Ok(true) = |
| 1178 | element.rich_compare_bool(value.as_object(), PyComparisonOp::Eq, vm) |
| 1179 | { |
| 1180 | return true; |
| 1181 | } |
| 1182 | } |
| 1183 | |
| 1184 | false |
| 1185 | } |
| 1186 | |
| 1187 | #[pyclassmethod] |
| 1188 | fn __class_getitem__( |
nothing calls this directly
no test coverage detected