William Stein wrote: > On 1/14/08, Jason Grout <[EMAIL PROTECTED]> wrote:
>> I noticed that the following gives an error in Sage 2.9: >> >> sage: f(x)=-x >> ------------------------------------------------------------ >> File "<ipython console>", line 1 >> <type 'exceptions.SyntaxError'>: can't assign to function call (<ipython >> console>, line 1) >> >> Is that a bug? It seems to be related to the negative sign, since the >> following works: >> >> sage: f(x)=(-x) >> sage: f(2) >> -2 > > Was there something funny about your x in the above example, > because it works fine for me: > > teragon:standard was$ sage > ---------------------------------------------------------------------- > | SAGE Version 2.9.3, Release Date: 2008-01-05 | > | Type notebook() for the GUI, and license() for information. | > ---------------------------------------------------------------------- > > sage: f(x) = -x > sage: f(2) > -2 > Could it be related to the spaces around '='? Jaap --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@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-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---