Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplifying "not (True and False) or True" results in '_TRUE' object is not callable #85

Open
1v-0 opened this issue May 3, 2019 · 1 comment

Comments

@1v-0
Copy link

1v-0 commented May 3, 2019

from boolean import BooleanAlgebra
BooleanAlgebra().parse("not (True and False) or True").simplify()

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ivigan/topic-streams-tools/env/lib/python3.6/site-packages/boolean/boolean.py", line 1170, in simplify
    expr = expr.literalize()
  File "/home/ivigan/topic-streams-tools/env/lib/python3.6/site-packages/boolean/boolean.py", line 603, in literalize
    args = tuple(arg.literalize() for arg in self.args)
  File "/home/ivigan/topic-streams-tools/env/lib/python3.6/site-packages/boolean/boolean.py", line 603, in <genexpr>
    args = tuple(arg.literalize() for arg in self.args)
  File "/home/ivigan/topic-streams-tools/env/lib/python3.6/site-packages/boolean/boolean.py", line 1035, in literalize
    expr = self.demorgan()
  File "/home/ivigan/topic-streams-tools/env/lib/python3.6/site-packages/boolean/boolean.py", line 1084, in demorgan
    return op.dual(*(self.__class__(arg).cancel() for arg in op.args))
TypeError: '_TRUE' object is not callable

@kkew3
Copy link

kkew3 commented Jun 15, 2019

Same here for OR(FALSE, NOT(AND(TRUE, TRUE))), which gives TypeError: '_FALSE' object is not callable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants