Don't add parentheses when splitting symbols to objects in dictionaries.

Crucial when object is a function so that it is not multiplied by its argument.

c.f. https://groups.google.com/forum/#!topic/sympy/MKhZdgB_Sg4
True, but there wasn't a function f in the first example, as I didn't put
it in the global_dict.  Let me change the example to make it clearer.

On Fri, Oct 31, 2014 at 4:20 PM, Christopher Smith <notifications@github.com
> wrote:

> In sympy/parsing/tests/test_sympy_parser.py:
>
> > +    y = Symbol('y')
> > +    xy = Symbol('xy')
> > +
> > +    assert parse_expr("xy") == xy
> > +    assert parse_expr("xy", transformations=transformations) == x*y
> > +
> > +
> > +def test_split_symbols_function():
> > +    transformations = standard_transformations + \
> > +                      (split_symbols, implicit_multiplication,)
> > +    x = Symbol('x')
> > +    a = Symbol('a')
> > +    f = Function('f')
> > +    fsym= Symbol('f')
> > +
> > +    assert parse_expr("af(x)", transformations=transformations) == a*fsym*x
>
>  The only way to distinguish the two is
> to explicitly define f as a function in the former case.
>
> What's a little confusing to me is that in the example with fsym you have
> a function and a symbol with name f. Does that make a difference to you?
> i.e. if there were not a function named f I can see interpreting the f as a
> symbol to give fsym*, but since there *is* a function, it seems like the
> better thing to do would be to use it (kinda PEMDAS - parenthesis are going
> to behave like function parentheses before multiplication parentheses).
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/sympy/sympy/pull/8307/files#r19694413>.
>



-- 
Duane Nykamp
School of Mathematics
University of Minnesota
202 Vincent Hall
206 Church St. SE
Minneapolis, MN 55455
www.math.umn.edu/~nykamp