Status: Accepted
Owner: asmeurer
Labels: Type-Enhancement Priority-Medium Logic

New issue 2531 by asmeurer: Basic Boolean types (True, False, None)
http://code.google.com/p/sympy/issues/detail?id=2531

We need three singleton types that derive from Boolean to represent True, False, and None. Right now, using the Python types is problematic because they can't be in .args (or at least, shouldn't be, Piecewise currently breaks this). Also, it's incomplete to not have them, in my opinion. Singleton, by the way, means that they should be part of S (like S.True, etc.). And of course, sympify({True, False, None}) should return the Basic types.

Related to this, the constructor for Boolean should be improved to return these (right now, it does nothing). Also, Boolean should be put in __init__.py.

The Boolean constructor would also be the way to convert the relational types from issue 1887.

What should these be named? You can't override the built-in names None, True, and False (nor would you want to). A long name, like BooleanTrue, wouldn't too bad because you could always just use the shortcut S.True, or just True with automatic sympification.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to