Skip to content

Commit 8719b91

Browse files
committed
Simplify comparison
1 parent cc28588 commit 8719b91

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/pyscipopt/expr.pxi

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,7 @@ cdef class ProdExpr(FuncExpr):
382382

383383
def __add__(self, other):
384384
other = Expr.to_const_or_var(other)
385-
if isinstance(other, ProdExpr) and hash(frozenset(self)) == hash(
386-
frozenset(other)
387-
):
385+
if isinstance(other, ProdExpr) and hash(self) == hash(other):
388386
return ProdExpr(*self, coef=self.coef + other.coef)
389387
return super().__add__(other)
390388

0 commit comments

Comments
 (0)