Okay, this is my fault, but I'm wondering if there's a way around it while still using SymPy. Specifically, I want the ability to create an equation with Python's == syntax. (I.e., I don't want to be forced to use the Eq() method.)
At one point in my code, I have done this: *from sympy import Basic, Eq* *Basic.__eq__ = Eq* This is fine, until I then try to execute this: *x = Symbol( 'x' )* *And( 0 <= x* ) Here's the traceback at that point starting from SymPy code (operations.py:341 is the start of the "no longer relevant" logic): ----- * File "/usr/local/lib/python2.7/site-packages/sympy-0.7.1-py2.7.egg/sympy/core/operations.py", line 325, in __new__* * _args = frozenset(cls._new_args_filter(args))* * File "/usr/local/lib/python2.7/site-packages/sympy-0.7.1-py2.7.egg/sympy/core/operations.py", line 341, in _new_args_filter* * if arg == cls.zero:* * File "/usr/local/lib/python2.7/site-packages/sympy-0.7.1-py2.7.egg/sympy/core/relational.py", line 31, in Eq* * return Relational(a,b,'==')* * File "/usr/local/lib/python2.7/site-packages/sympy-0.7.1-py2.7.egg/sympy/core/relational.py", line 121, in __new__* * rhs = _sympify(rhs)* * File "/usr/local/lib/python2.7/site-packages/sympy-0.7.1-py2.7.egg/sympy/core/sympify.py", line 186, in _sympify* * return sympify(a, strict=True)* * File "/usr/local/lib/python2.7/site-packages/sympy-0.7.1-py2.7.egg/sympy/core/sympify.py", line 100, in sympify* * raise SympifyError(a)* *sympy.core.sympify.SympifyError: SympifyError: False* ----- So, I'm clearly messing with SymPy internals, but is there a way to still accomplish what I want in regards to use == to create equations? Thanks, Kevin -- You received this message because you are subscribed to the Google Groups "sympy" group. To view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/Av_UsLRzp2IJ. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.