You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sage: cartesian_product([Set([])])
The Cartesian product of ({},)
sage: cartesian_product([Set([])]).is_empty()
True
sage: bool(cartesian_product([Set([])]))
True
Expected Behavior
bool should return not self.is_empty()
Actual Behavior
it always return True
Additional Information
Basically this is caused by the __bool__ implementation of Parent. The is_empty is in Sets.CartesianProducts.ParentMethods, but putting another __bool__ there cannot override because it is below.
Environment
OS: Linux
Sage Version: latest master
Checklist
I have searched the existing issues for a bug report that matches the one I want to file, without success.
I have read the documentation and troubleshoot guide
The text was updated successfully, but these errors were encountered:
Steps To Reproduce
Expected Behavior
bool should return
not self.is_empty()
Actual Behavior
it always return True
Additional Information
Basically this is caused by the
__bool__
implementation ofParent
. Theis_empty
is inSets.CartesianProducts.ParentMethods
, but putting another__bool__
there cannot override because it is below.Environment
Checklist
The text was updated successfully, but these errors were encountered: