We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a443a0b commit 5480f4cCopy full SHA for 5480f4c
vm/src/builtins/union.rs
@@ -271,9 +271,14 @@ impl Comparable for PyUnion {
271
) -> PyResult<PyComparisonValue> {
272
op.eq_only(|| {
273
let other = class_or_notimplemented!(Self, other);
274
+ let a = PyFrozenSet::from_iter(vm, zelf.args.into_iter().cloned())?;
275
+ let b = PyFrozenSet::from_iter(vm, other.args.into_iter().cloned())?;
276
Ok(PyComparisonValue::Implemented(
- zelf.args()
- .rich_compare_bool(other.args().as_ref(), PyComparisonOp::Eq, vm)?,
277
+ a.into_pyobject(vm).as_object().rich_compare_bool(
278
+ b.into_pyobject(vm).as_object(),
279
+ PyComparisonOp::Eq,
280
+ vm,
281
+ )?,
282
))
283
})
284
}
0 commit comments