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 __str__ for EventFiniteNominal to quote the actual nominal values #86

Closed
fsaad opened this issue May 26, 2020 · 3 comments
Closed

Comments

@fsaad
Copy link
Collaborator

fsaad commented May 26, 2020

X << ['a', 'b']

should render as

X << {'a', 'b'}

so as to distinguish between symbolic entities (x) and string entities ('a', 'b') in the language.

Similarly, for negation we have

~(X << ['a', 'b'])

should render as

X << UniversalSet() \ {'a', 'b'}
@fsaad
Copy link
Collaborator Author

fsaad commented May 26, 2020

I remember now that sympy.FiniteSet('0') will automatically convert the string '0' to an integer 0, so NominalValue(Atom) tricks sympy into thinking that '0' cannot be converted (by overriding its 'str' method).

@fsaad
Copy link
Collaborator Author

fsaad commented May 26, 2020

Sympy now plan to remove this horrible feature :)
sympy/sympy#18066

@fsaad
Copy link
Collaborator Author

fsaad commented Aug 20, 2020

Fixed by removing the Sympy dependence #93

@fsaad fsaad closed this as completed Aug 20, 2020
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

1 participant