Skip to content

Store S.true/false in Interval.left_open/right_open #2980

Merged
merged 4 commits into from Mar 23, 2014

3 participants

@skirpichev

fixes #6211

@asmeurer
SymPy member
asmeurer commented Mar 1, 2014

Can one use arbitrary Booleans in place of them?

@skirpichev

Can one use arbitrary Booleans in place of them?

Not now. E.g.:

In [7]: Interval(0, 1, And(x, y))
Out[7]: (0, 1]

It counts And (which is not None here) as True.

@hargup
SymPy member
hargup commented Mar 2, 2014

Can one use arbitrary Booleans in place of them?

Not now. E.g.:
In [7]: Interval(0, 1, And(x, y))
Out[7]: (0, 1]

Shouldn't such arguments raise a ValueError?

btw these arguments also doesn't raise a ValueError

Interval(0, 1, x, y)
Out[18]: (0, 1)

Interval(0, 1, f(x), g(x))
Out[23]: (0, 1)
@skirpichev

@hargup, thanks - check was added in the last commit

@skirpichev skirpichev added the Sets label Mar 13, 2014
@asmeurer asmeurer merged commit 35a5036 into sympy:master Mar 23, 2014

1 check passed

Details default The Travis CI build passed
@skirpichev skirpichev deleted the unknown repository branch Mar 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.