Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Aug 17, 2022
1 parent ed7ddeb commit 9f16cef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sage/sets/cartesian_product.py
Expand Up @@ -347,15 +347,15 @@ def __classcall_private__(cls, sets, category, flatten=False):
def __eq__(self, other):
if not any(isinstance(set, EnumeratedSetFromIterator) and set not in FiniteEnumeratedSets()
for set in self._sets):
# Use WithIdentityById
# Use WithEqualityById
return super().__eq__(other)
# No flattening, hence we are equal if and only if our factors are equal
return self.cartesian_factors() == other.cartesian_factors()

def __hash__(self):
if not any(isinstance(set, EnumeratedSetFromIterator) and set not in FiniteEnumeratedSets()
for set in self._sets):
# Use WithIdentityById
# Use WithEqualityById
return super().__hash__()
# No flattening, hence we are equal if and only if our factors are equal
return hash(self.cartesian_factors())
Expand Down

0 comments on commit 9f16cef

Please sign in to comment.