Status: Accepted
Owner: [email protected]
Labels: Type-Defect Priority-Medium

New issue 1819 by [email protected]: _sympify(True) == 1
http://code.google.com/p/sympy/issues/detail?id=1819

In [1]: from sympy.core.sympify import _sympify
In [2]: _sympify(True)
Out[2]: 1
In [3]: _sympify(False)
Out[3]: 0

This is surprising and undocumented. It also leads to results like S(1) +
True == 2, which is mathematically inconsistent, though consistent with
Python's inconsistencies.

Existing code relies on _sympify to only output sympy objects, so it should
probably raise a SympifyError on booleans.


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--
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