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

Fix dual for _TRUE and _FALSE #100

Merged
merged 2 commits into from
Jan 8, 2021
Merged

Fix dual for _TRUE and _FALSE #100

merged 2 commits into from
Jan 8, 2021

Conversation

pauleve
Copy link
Contributor

@pauleve pauleve commented Dec 11, 2020

The dual member of operators is assumed to be a class. However, for TRUE and FALSE, it is an object.

This leads to errors with simplify() or literalize() within the demorgan() method when applied on TRUE or FALSE objects (e.g., #85)

There are two ways of fixing this: either assign the dual member of TRUE and FALSE to the corresponding class, or add a __call__ method to these objects returning themselves.

This PR adopts the latter approach to respect as much as possible the singleton design pattern.

@pombredanne
Copy link
Collaborator

@pauleve Thank you ++ for this! let me review and merge shortly

Copy link
Collaborator

@pombredanne pombredanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Thanks again

@pombredanne pombredanne merged commit a68f947 into bastikr:master Jan 8, 2021
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

Successfully merging this pull request may close these issues.

2 participants