Currently, sets are not handled in comparisons with dict views:
In Python:
>>> d = {1: 2}
>>> d.keys() == set([1])
True
while in RustPython:
>>>>> d = {1: 2}
>>>>> d.keys() == set([1])
False
In CPython, the corresponding implementation (dictview_richcompare) calls another function that iterates through the view and continuously calls __contains__ on the other object (see all_contained_in function).
Currently, sets are not handled in comparisons with dict views:
In Python:
while in RustPython:
In CPython, the corresponding implementation (
dictview_richcompare) calls another function that iterates through the view and continuously calls__contains__on the other object (seeall_contained_infunction).