@@ -22,10 +22,10 @@ def sage_eval(source, locals=None, cmds='', preparse=True):
22
22
INPUT:
23
23
24
24
25
- - ``source`` - a string or object with a _sage_
25
+ - ``source`` - a string or object with a `` _sage_``
26
26
method
27
27
28
- - ``locals`` - evaluate in namespace of sage.all plus
28
+ - ``locals`` - evaluate in namespace of :mod:` sage.all` plus
29
29
the locals dictionary
30
30
31
31
- ``cmds`` - string; sequence of commands to be run
@@ -59,10 +59,10 @@ def sage_eval(source, locals=None, cmds='', preparse=True):
59
59
x^2 + 1
60
60
61
61
This example illustrates that evaluation occurs in the context of
62
- ``from sage.all import *``. Even though bernoulli has
62
+ ``from sage.all import *``. Even though `` bernoulli`` has
63
63
been redefined in the local scope, when calling
64
- `` sage_eval`` the default value meaning of bernoulli
65
- is used. Likewise for QQ below.
64
+ :func:` sage_eval` the default value meaning of :func:` bernoulli`
65
+ is used. Likewise for ``QQ`` below.
66
66
67
67
::
68
68
@@ -125,7 +125,7 @@ def sage_eval(source, locals=None, cmds='', preparse=True):
125
125
sage: vars['rt2']
126
126
1.41421356237310
127
127
128
- This example illustrates how `` sage_eval` ` can be
128
+ This example illustrates how :mod:` sage_eval` can be
129
129
useful when evaluating the output of other computer algebra
130
130
systems.
131
131
@@ -144,8 +144,8 @@ def sage_eval(source, locals=None, cmds='', preparse=True):
144
144
RuntimeError: Use ** for exponentiation, not '^', which means xor
145
145
in Python, and has the wrong precedence.
146
146
147
- Here you can see eval simply will not work but
148
- `` sage_eval` ` will.
147
+ Here you can see that :func:` eval` simply will not work but
148
+ :func:` sage_eval` will.
149
149
150
150
TESTS:
151
151
@@ -201,14 +201,14 @@ def sage_eval(source, locals=None, cmds='', preparse=True):
201
201
202
202
def sageobj (x , vars = None ):
203
203
"""
204
- Return a native Sage object associated to x , if possible and
204
+ Return a native Sage object associated to ``x`` , if possible and
205
205
implemented.
206
206
207
- If the object has an _sage_ method it is called and the value is
208
- returned. Otherwise str is called on the object, and all preparsing
207
+ If the object has a `` _sage_`` method it is called and the value is
208
+ returned. Otherwise, :func:` str` is called on the object, and all preparsing
209
209
is applied and the resulting expression is evaluated in the context
210
210
of ``from sage.all import *``. To evaluate the
211
- expression with certain variables set, use the vars argument, which
211
+ expression with certain variables set, use the `` vars`` argument, which
212
212
should be a dictionary.
213
213
214
214
EXAMPLES::
0 commit comments