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 e41d7f5 commit 739bc8dCopy full SHA for 739bc8d
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
@@ -425,8 +425,9 @@ impl PySetInner {
425
vm: &VirtualMachine,
426
) -> PyResult<()> {
427
for iterable in others {
428
- for item in iterable.iter(vm)? {
429
- self.content.delete_if_exists(vm, &*item?)?;
+ let items = iterable.iter(vm)?.collect::<Result<Vec<_>, _>>()?;
+ for item in items {
430
+ self.content.delete_if_exists(vm, &*item)?;
431
}
432
433
Ok(())
0 commit comments