On Sep 12, 2007, at 2:14 PM, William Stein wrote:

> On 9/12/07, Robert Bradshaw <[EMAIL PROTECTED]> wrote:
>
>> That's assuming we go beyond 1-argument functions, which may or may
>> not be a good idea (and is certainly less common).
>>
>> Also, I would propose
>>
>> sage: x, y = var('x y')
>> sage: f(x) = x^2 + 1
>> sage: f + sin
>> x^2 + 1 + sin(x)
>> sage: y + sin
>> y + sin(y)
>>
>> BTW, I think this is a bug:
>>
>> sage: f = x+y
>> sage: f
>> y + x
>> sage: f(4)
>> y + 4
>>
>
> That's not a bug, that's *exactly* how we designed things
> to work.   Calling when the inputs are explicit is done with
> the variables in dictionary order.

I'll take that back, I didn't know dictionary order was explicitly  
used, and I'm OK with that as there is no ambiguity. Is there any  
reason f(2,3) does not work?

>
> sage: var('x,y')
> (x, y)
> sage: f = x+y
> sage: f(4)
> y + 4
> sage: f(4)(7)
> 11
>
> If you have a good argument for changing this (and are willing
> to the do work), I am certainly interested in it.
>
> William
>
> 

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to