Skip to content

Feature: Add __bool__ operators for Empty and Whole #12

Description

@carlos-adir

To check if two subsets are disjoint, one can do:

if subseta & subsetb == Empty():
    print("They are disjoint")
else:
    print("They are not disjoint")

The intention is to add __bool__ operator in Empty and Whole, since they present the meaning of false and true.

Not yet sure if the other classes such as SingleValue or Interval or Disjoint should give as result

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions