Skip to content

Commit e372be1

Browse files
committed
Fix bool_eq argument order of _membership_iter_search for compatability with cpython
1 parent 368e47c commit e372be1

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

Lib/test/test_iter.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,6 @@ def __next__(self):
648648
except OSError:
649649
pass
650650

651-
# TODO: RUSTPYTHON
652-
@unittest.expectedFailure
653651
# Test iterators with 'x in y' and 'x not in y'.
654652
def test_in_and_not_in(self):
655653
for sc5 in IteratingSequenceClass(5), SequenceClass(5):

vm/src/vm/vm_ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ impl VirtualMachine {
503503
let iter = haystack.get_iter(self)?;
504504
loop {
505505
if let PyIterReturn::Return(element) = iter.next(self)? {
506-
if self.bool_eq(&needle, &element)? {
506+
if self.bool_eq(&element, &needle)? {
507507
return Ok(self.ctx.new_bool(true));
508508
} else {
509509
continue;

0 commit comments

Comments
 (0)