Re: [sympy] And() with a boolean?

2012-01-23 Thread Aaron Meurer
This has been discussed before. Overriding Basic.__eq__ is unrecommended, because a ton of code uses == with its current meaning, and, as you've found, changing this will break things. Here are some workarounds I can see: - Do some kind of string parsing. In other words, it's pretty straight fo

Re: [sympy] And() with a boolean?

2012-01-23 Thread Kevin Hunter
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 impor

Re: [sympy] And() with a boolean?

2012-01-23 Thread Aaron Meurer
On Mon, Jan 23, 2012 at 1:21 AM, Chris Smith wrote: > On Mon, Jan 23, 2012 at 1:55 PM, Kevin Hunter wrote: >> Hullo Sympifiers, >> >> I've created (programmatically) a situation that boils down to something >> like: >> >> x, y = symbols( 'x,y' ) >> And( x < y, y < oo ) >> >> This currently result

Re: [sympy] And() with a boolean?

2012-01-23 Thread Kevin Hunter
Having done a little debugging, I now can't produce a simple example like I could so easily last night. Potentially a false alarm as I now suspect I may have polluted SymPy's namespace somehow. (The same code in two different instances of SymPy works and doesn't work.) I'll post when I have

Re: [sympy] And() with a boolean?

2012-01-23 Thread Chris Smith
On Mon, Jan 23, 2012 at 1:55 PM, Kevin Hunter wrote: > Hullo Sympifiers, > > I've created (programmatically) a situation that boils down to something > like: > > x, y = symbols( 'x,y' ) > And( x < y, y < oo ) > > This currently results in a sympification error, Can you post the traceback? I don't

[sympy] And() with a boolean?

2012-01-23 Thread Kevin Hunter
Hullo Sympifiers, I've created (programmatically) a situation that boils down to something like: *x, y = symbols( 'x,y' )* *And( x < y, y < oo )* This currently results in a sympification error, I gather on the boolean that the *y < oo* becomes. I'm not clear on why, however. In this case,