1 | initial version |
The preparse
function preparses an expression, for example preparse('2^2')
. To set the preparser off, you should use the preparser
function:
sage: preparser(False)
2 | No.2 Revision |
The preparse
function preparses an expression, for example preparse('2^2')
. To set the preparser off, you should use the preparser
function:
sage: preparser(False)
EDIT:
Another possibility is to attach a file ending with .py
and not .sage
so that the preparser will not be used for that file.
3 | No.3 Revision |
The preparse
function preparses an expression, for example preparse('2^2')
. To set the preparser off, you should use the preparser
function:
sage: preparser(False)
EDIT: EDIT:
Another possibility is to attach a file ending with .py
and not .sage
so that the preparser will not be used for that file.
Also, since the only problem comes from the fact that floats like 1.
are turned into Sage RealNumber
's by the preparser, another possibility is to explicitely tell to keep those number unparsed, by typing : 1.r
instead of 1.
, the letter r
standing for "raw".
Yet another (dirty but lazy) possiblity is to redifine Sage RealNumber
to be Python float
, by adding the following line at the beginning:
sage: RealNumber=float