Comment #17 on issue 1932 by [email protected]: Relationals do not work with any methods of Expr
http://code.google.com/p/sympy/issues/detail?id=1932

I modified the do() definition to handle passed functions and did a little cleanup:

def do(self, e):
    if isinstance(e, (FunctionClass, Lambda, type(lambda:1))):
        return self.applyfunc(e)
    e = S(e)
    i = e.free_symbols - self.free_symbols
    if len(i) != 1:
        raise ValueError('expecting a variable to represent a side')
    i = i.pop()
    return self.applyfunc(lambda side: e.subs(i, side))

e=Eq(2*x+4, 5)
e.do(sin)
sin(2*x + 4) == sin(5)

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy-issues.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to