What you need to consider is if Eq is really an iterable container or
not. You can always convert it to one--or indeed, any Basic object
into one--using .args. It's also straight forward enough to combine
this with list comprehensions for functions like zip().

Personally, I don't think it is, but what exactly Relationals are and
aren't is ambiguous (c.f. issue 1887).

Aaron Meurer

On Jun 1, 2012, at 4:01 PM, "krastanov.ste...@gmail.com"
<krastanov.ste...@gmail.com> wrote:

> What about making Eq iterable? It will permit the use of zip on a list of Eq.
>
> On 1 June 2012 20:48, Aaron Meurer <asmeu...@gmail.com> wrote:
>> I thought this too, but the consensus was to make it not do it.  For
>> example, what would (x + y).subs(Eq(x, y)) return? See
>> http://code.google.com/p/sympy/issues/detail?id=2677.
>>
>> Aaron Meurer
>>
>> On Wed, May 30, 2012 at 10:36 AM, krastanov.ste...@gmail.com
>> <krastanov.ste...@gmail.com> wrote:
>>> Do you agree? It would be useful for:
>>>
>>> In [10]: x.subs(Eq(x,1))
>>> ---------------------------------------------------------------------------
>>> ValueError:
>>> When a single argument is passed to subs it should be an iterable of
>>> (old, new) tuples.
>>>
>>> In [11]: x.subs([Eq(x,1)])
>>> ---------------------------------------------------------------------------
>>> TypeError: 'Equality' object is not iterable
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "sympy" group.
>>> 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.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "sympy" group.
>> 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.
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> 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.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
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.

Reply via email to