Open
Description
sage: a,y,z=var('a,y,z')
sage: (x*sin(sin(x + y + 2*a))).substitute_function(sin,cos)
x*cos(cos(2*a + x + y))
sage: (x*sin(sin(x + y + 2*a))).substitute_function(sin,z)
/home/ralf/sage/local/lib/python2.7/site-packages/sage/symbolic/expression_conversions.py:223: DeprecationWarning: Substitution using function-call syntax and unnamed arguments is deprecated and will be removed from a future release of Sage; you can use named arguments instead, like EXPR(x=..., y=...)
See http://trac.sagemath.org/5930 for details.
return self.composition(ex, operator)
(2*a + x + y)*x
The method would be expected to give a meaningful error when seeing a variable as second argument.
Component: symbolics
Issue created by migration from https://trac.sagemath.org/ticket/17757