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

Commit

Permalink
Trac 18411: fix is_empty
Browse files Browse the repository at this point in the history
  • Loading branch information
videlec committed Sep 12, 2015
1 parent 9beb023 commit 6580825
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sage/categories/sets_cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2126,9 +2126,11 @@ def is_finite(self):
try:
# Note: some parent might not implement "is_empty". So we
# carefully isolate this test.
return any(c.is_empty() for c in f)
test = any(c.is_empty() for c in f)
except Exception:
pass
else:
if test: return test
return all(c.is_finite() for c in f)

def cardinality(self):
Expand Down

0 comments on commit 6580825

Please sign in to comment.