Skip to content

Commit 16efed0

Browse files
author
Matthias Koeppe
committed
src/sage/misc/sage_eval.py: Fix markup
1 parent af823cc commit 16efed0

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/sage/misc/sage_eval.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def sage_eval(source, locals=None, cmds='', preparse=True):
2222
INPUT:
2323
2424
25-
- ``source`` - a string or object with a _sage_
25+
- ``source`` - a string or object with a ``_sage_``
2626
method
2727
28-
- ``locals`` - evaluate in namespace of sage.all plus
28+
- ``locals`` - evaluate in namespace of :mod:`sage.all` plus
2929
the locals dictionary
3030
3131
- ``cmds`` - string; sequence of commands to be run
@@ -59,10 +59,10 @@ def sage_eval(source, locals=None, cmds='', preparse=True):
5959
x^2 + 1
6060
6161
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
6363
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.
6666
6767
::
6868
@@ -125,7 +125,7 @@ def sage_eval(source, locals=None, cmds='', preparse=True):
125125
sage: vars['rt2']
126126
1.41421356237310
127127
128-
This example illustrates how ``sage_eval`` can be
128+
This example illustrates how :mod:`sage_eval` can be
129129
useful when evaluating the output of other computer algebra
130130
systems.
131131
@@ -144,8 +144,8 @@ def sage_eval(source, locals=None, cmds='', preparse=True):
144144
RuntimeError: Use ** for exponentiation, not '^', which means xor
145145
in Python, and has the wrong precedence.
146146
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.
149149
150150
TESTS:
151151
@@ -201,14 +201,14 @@ def sage_eval(source, locals=None, cmds='', preparse=True):
201201

202202
def sageobj(x, vars=None):
203203
"""
204-
Return a native Sage object associated to x, if possible and
204+
Return a native Sage object associated to ``x``, if possible and
205205
implemented.
206206
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
209209
is applied and the resulting expression is evaluated in the context
210210
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
212212
should be a dictionary.
213213
214214
EXAMPLES::

0 commit comments

Comments
 (0)