Sage is based on Interactive Python. Therefore, every feature in IPython works in SageMath. For example, one feature is automatic-parentheses-and-quotes.
So, if you are too lazy to write parenthesis and commas, then you can turn on the autocall magic and use it by starting the line by /
:
sage: %autocall 1
Automatic calling is: Smart
sage: f(x,y,z) = x + y^2 + z^3
sage: /f x+1 y+2 z+3 # no parenthesis, no comma!
(z + 3)^3 + (y + 2)^2 + x + 1
There is also the auto-quoting which can be used if you are too lazy to quote strings. It may be activated by starting the line with a comma:
sage: ,print aujourd'hui # no parenthesis, no comma, no quotes "" !
aujourd'hui
For more information and options, see the documentation of IPython on the link above or as follows:
$ sage -ipython
Python 3.11.1 (main, Sep 2 2023, 13:40:58) [GCC 9.4.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.6.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: ?
Please provide a complete code example, including the definition of
f
.Hi
But I'm probably missing something here, maybe you could give the function f in order to check with your function as Max Alekseyev asked you ?.
@ortollj@Max Alekseyev Writing
x^2+x^3-31//Sin
is equivalent toSin[x^2 + x^3 - 31]
in Mathematica. OP asks whether there is equivalent of this syntax//
in Sagemath.Let's wait clarification from OP. I read the question differently, and I do not understand why
f(x^2 + x^3 - 31)
is not considered quick enough. This may depend on howf
is defined, hence I asked for clarification.