Re: [sage-support] Lambda functions vs. defining functions

2016-08-10 Thread William Stein
On Wednesday, August 10, 2016, Todd Zimmerman wrote: > I assumed that SageMath converts the functions into symbolic expressions. > If I enter the following it will work: > > > f=lambda x: x*sin(x) > diff(f(x),x) > f is a python function f(x) is a symbolic expression - the result of calling f wi

Re: [sage-support] Lambda functions vs. defining functions

2016-08-10 Thread William Stein
On Wednesday, August 10, 2016, Todd Zimmerman wrote: > I'm aware of the difference between the two approaches in vanilla Python, > I was just trying to figure out if SageMath treats the two differently. > > No it doesn't. > > You can integrate and differentiate both types of functions in Sage

Re: [sage-support] Lambda functions vs. defining functions

2016-08-10 Thread William Stein
On Wed, Aug 10, 2016 at 7:36 AM, Todd Zimmerman wrote: > Is there any significant difference in SageMath between defining a function > using lambda vs. defining it using 'def ...:'? Both situations result in > functions that can be differentiated, integrated, etc so I'm not sure if > there is any

[sage-support] Lambda functions vs. defining functions

2016-08-10 Thread Todd Zimmerman
Is there any significant difference in SageMath between defining a function using lambda vs. defining it using 'def ...:'? Both situations result in functions that can be differentiated, integrated, etc so I'm not sure if there is any functional difference between the two methods in SageMath.