Updates:
Blockedon: -1766
Comment #5 on issue 1836 by smichr: subs can see the 2 arg sum
http://code.google.com/p/sympy/issues/detail?id=1836
I've introduced some other modifications to subs at commit 1836 in branch
t2 (at github/smichr). They are discussed at Discussion "subs
enhancements". Part of the docstring of subs now reads:
Input is either two arguments representing the old, new
subexpressions
or single argument (list or dictionary) containing (old, new) pairs:
argument semantics
---------- ----------------------------------------
old, new old is replaced with new
old, Eq old is replaced with solve(Eq, old)[0]
[(old, new), ...] sequential substitutions of old with new
{old: new, ...} sorted so longest patterns appear first
When keyword `exact` is True then only entire arguments will be
affected by replacements, i.e. 1 + x + y will be unchanged by
old = 1 + x since 1 + x does not completely match any arguments of
the
original expression. The only case where an exception is made is for
the replacement of an Add which can replace another Add if they
differ
only by a multiplicative numerical constant: 1 + x in 2 + 2*x can
be
replaced.
If keyword `mul2` is set to True when `exact` is True then the
substitution
will allow an exception for terms that may have been affected by
the 2-arg
Mul behavior; 1 + x -> y will then change 2 + 2*x into 2*y.
There is also a 'static' keyword that makes sure that no successive
replacement will change substitutions that have already been made;
substitution is a 1:1 operation.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-iss...@googlegroups.com.
To unsubscribe from this group, send email to
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.