We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cac433 commit 8589b55Copy full SHA for 8589b55
Lib/test/test_set.py
@@ -582,8 +582,6 @@ def test_ixor(self):
582
else:
583
self.assertNotIn(c, self.s)
584
585
- # TODO: RUSTPYTHON
586
- @unittest.expectedFailure
587
def test_inplace_on_self(self):
588
t = self.s.copy()
589
t |= t
vm/src/builtins/set.rs
@@ -426,8 +426,9 @@ impl PySetInner {
426
vm: &VirtualMachine,
427
) -> PyResult<()> {
428
for iterable in others {
429
- for item in iterable.iter(vm)? {
430
- self.content.delete_if_exists(vm, &*item?)?;
+ let items = iterable.iter(vm)?.collect::<Result<Vec<_>, _>>()?;
+ for item in items {
431
+ self.content.delete_if_exists(vm, &*item)?;
432
}
433
434
Ok(())
0 commit comments