You can do it with subs or replace, but the proposed way is a little
cleaner.  It fits nicely with the concept of replacing a
(mathematical) function with it's value.  See the other discussion on
this list about it.

Aaron Meurer

On Wed, May 23, 2012 at 9:41 AM, [email protected]
<[email protected]> wrote:
> I am sorry for not participating in the pull request discussions.
> Maybe this was discussed, but why would you prefer this method instead
> of:
>
> In [3]: (f(x,y)+1).subs(f, Lambda([x, y], x+y))
> Out[3]: x + y + 1
>
> It seems that this does the same thing with a slightly different syntax.
>
> Otherwise the `inline` proposal for a name sounds ok. It is just that
> this is a special case of function that is already implemented (or am
> I wrong?).
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" 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?hl=en.
>

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

Reply via email to