| 272 | } |
| 273 | |
| 274 | pub(super) fn symmetric_difference( |
| 275 | &self, |
| 276 | other: ArgIterable, |
| 277 | vm: &VirtualMachine, |
| 278 | ) -> PyResult<Self> { |
| 279 | let new_inner = self.clone(); |
| 280 | |
| 281 | // We want to remove duplicates in other |
| 282 | let other_set = Self::from_iter(other.iter(vm)?, vm)?; |
| 283 | |
| 284 | for item in other_set.elements() { |
| 285 | new_inner.content.delete_or_insert(vm, &item, ())? |
| 286 | } |
| 287 | |
| 288 | Ok(new_inner) |
| 289 | } |
| 290 | |
| 291 | fn issuperset(&self, other: ArgIterable, vm: &VirtualMachine) -> PyResult<bool> { |
| 292 | for item in other.iter(vm)? { |