On Monday 17 December 2007 11:41, William Stein wrote:
> This is *not* a bug.  The is by design.  Since f has no variables it
> is no longer
> implicitly callable:
>
> sage: f.variables()
> ()
> sage: f(1)
> .ValueError: the number of arguments must be less than or equal to 0
>
> You will have to instead write:
> sage: f(t) = t*sin(0)
> sage: f(1)
> 0
>
> or use
>
> sage: f=t*sin(0)
> sage: f(t=0)
> 0

Ok, I agree that this is correct.  And, furthermore, I think -- and have 
thought for a long time -- that 
sage: f=t*cos(0)
should also not create a callable function.  The situation I ran into this was 

sage:  parametric_plot( (t*cos(0),t*sin(0)), t=...)
It seems like a perfectly logical command in my script because the next line 
is 
sage:  parametric_plot( (1*cos(t),1*sin(t)), t=...)

Now, I'm perfectly fine with your solution to not make it callable, but I 
think it is going to produce a collection of inconsistent results of this 
nature.  And, as I say, I think the correct solution is not to make any 
symbolic solution arbitrarily callable unless it is explicitly promoted to 
being callable in some way.

But, as should be obvious, I did appreciate the sort of lazy call-ability 
which I argued against in the previous paragraph.  I admit its nice to use 
even if it is ambiguous and error-prone.

--
Joel

--~--~---------~--~----~------------~-------~--~----~
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