diff --git a/src/doc/de/tutorial/interactive_shell.rst b/src/doc/de/tutorial/interactive_shell.rst index b356ea21f45..d29e7924871 100644 --- a/src/doc/de/tutorial/interactive_shell.rst +++ b/src/doc/de/tutorial/interactive_shell.rst @@ -373,7 +373,7 @@ Fehlerbehandlung Wenn irgendetwas schief geht, werden Sie normalerweise eine Python-Fehlermeldung sehen. Python macht sogar einen Vorschlag, was den Fehler ausgelöst hat. Oft sehen Sie den Namen der Fehlermeldung, -z.B. ``NameError`` oder ``ValueError`` (vgl. Python Library Reference +z.B. :class:`NameError` oder :class:`ValueError` (vgl. Python Library Reference [PyLR]_ für eine komplette Liste der Fehlermeldungen). Zum Beispiel: .. skip diff --git a/src/doc/en/faq/faq-usage.rst b/src/doc/en/faq/faq-usage.rst index cd4feb44a1b..a495ad7f4cc 100644 --- a/src/doc/en/faq/faq-usage.rst +++ b/src/doc/en/faq/faq-usage.rst @@ -115,7 +115,7 @@ issue these commands: import _tkinter import Tkinter -If they do not raise an ``ImportError`` then it worked. +If they do not raise an :class:`ImportError` then it worked. How do I import Sage into a Python script? @@ -663,7 +663,7 @@ With objects a and b and a function f, I accidentally typed f(a) = b instead of It is because of how functions are defined in Sage with the ``f(x) = expr`` notation using the preparser. Also notice that if you make this mistake inside of an ``if`` statement, you will get a -``SyntaxError`` before anything else goes wrong. So in this case, +:class:`SyntaxError` before anything else goes wrong. So in this case, there is no problem. diff --git a/src/doc/en/installation/source.rst b/src/doc/en/installation/source.rst index f4b0526eb95..b156165778b 100644 --- a/src/doc/en/installation/source.rst +++ b/src/doc/en/installation/source.rst @@ -546,7 +546,7 @@ If sage: import _tkinter sage: import Tkinter -does not raise an ``ImportError``, then it worked. +does not raise an :class:`ImportError`, then it worked. .. _build-from-source-step-by-step: diff --git a/src/doc/en/reference/coercion/index.rst b/src/doc/en/reference/coercion/index.rst index d6d117cd263..27459609dc9 100644 --- a/src/doc/en/reference/coercion/index.rst +++ b/src/doc/en/reference/coercion/index.rst @@ -345,7 +345,7 @@ Methods to implement this case ``r * s`` gets handled as ``r._act_on_(s, True)`` or ``s._acted_upon_(r, False)`` and ``s * r`` as ``r._act_on_(s, False)`` or ``s._acted_upon_(r, True)``. There is no constraint on the type or parents - of objects passed to these methods; raise a ``TypeError`` or ``ValueError`` + of objects passed to these methods; raise a :class:`TypeError` or :class:`ValueError` if the wrong kind of object is passed in to indicate the action is not appropriate here. diff --git a/src/doc/en/thematic_tutorials/tutorial-programming-python.rst b/src/doc/en/thematic_tutorials/tutorial-programming-python.rst index 5cafdf1ea1b..47055a41bb5 100644 --- a/src/doc/en/thematic_tutorials/tutorial-programming-python.rst +++ b/src/doc/en/thematic_tutorials/tutorial-programming-python.rst @@ -176,9 +176,9 @@ indentation. Most of the time a new block is introduced by .. CODE-BLOCK:: python - raise [, error message] + raise [("error message")] - Usual errors include ``ValueError`` and ``TypeError``. + Usual errors include :class:`ValueError` and :class:`TypeError`. Functions ========= diff --git a/src/doc/en/tutorial/interactive_shell.rst b/src/doc/en/tutorial/interactive_shell.rst index c870098943a..5ab9e6a79a6 100644 --- a/src/doc/en/tutorial/interactive_shell.rst +++ b/src/doc/en/tutorial/interactive_shell.rst @@ -426,7 +426,7 @@ Errors and Exceptions When something goes wrong, you will usually see a Python "exception". Python even tries to suggest what raised the exception. Often you see the name of the exception, e.g., -``NameError`` or ``ValueError`` (see the Python Library Reference [PyLR]_ +:class:`NameError` or :class:`ValueError` (see the Python Library Reference [PyLR]_ for a complete list of exceptions). For example, .. skip diff --git a/src/doc/en/tutorial/tour_algebra.rst b/src/doc/en/tutorial/tour_algebra.rst index 225606a729f..c388b7adb5c 100644 --- a/src/doc/en/tutorial/tour_algebra.rst +++ b/src/doc/en/tutorial/tour_algebra.rst @@ -16,7 +16,7 @@ functions are defined to be ``var(...)``. As an example: sage: diff(sin(u), u) cos(u) -If you get a ``NameError``, check to see if you misspelled something, +If you get a :class:`NameError`, check to see if you misspelled something, or forgot to define a variable with ``var(...)``. diff --git a/src/doc/en/tutorial/tour_functions.rst b/src/doc/en/tutorial/tour_functions.rst index f00991813c2..096e088bd2e 100644 --- a/src/doc/en/tutorial/tour_functions.rst +++ b/src/doc/en/tutorial/tour_functions.rst @@ -24,7 +24,7 @@ These functions can be plotted, but not differentiated or integrated. Graphics object consisting of 1 graphics primitive In the last line, note the syntax. Using ``plot(f(z), 0, 2)`` instead -will give a ``NameError``, because ``z`` is a dummy variable in the +will give a :class:`NameError`, because ``z`` is a dummy variable in the definition of ``f`` and is not defined outside of that definition. In order to be able to use ``f(z)`` in the plot command, ``z`` (or whatever is desired) needs to be defined as a variable. We diff --git a/src/doc/fr/tutorial/interactive_shell.rst b/src/doc/fr/tutorial/interactive_shell.rst index 8b22343eda5..1d1703cebea 100644 --- a/src/doc/fr/tutorial/interactive_shell.rst +++ b/src/doc/fr/tutorial/interactive_shell.rst @@ -432,8 +432,9 @@ Erreurs et exceptions Quand quelque chose ne marche pas, cela se manifeste habituellement par une « exception » Python. Python essaie de plus de donner une idée de ce qui a pu déclencher l'exception. Bien souvent, il affiche le nom de -l'exception (par exemple ``NameError`` ou ``ValueError``, voir le manuel -de référence de la bibliothèque de Python [PyLR]_ pour une liste complète). Par exemple : +l'exception (par exemple :class:`NameError` ou :class:`ValueError`, voir +le manuel de référence de la bibliothèque de Python [PyLR]_ pour une liste +complète). Par exemple : .. skip diff --git a/src/doc/it/faq/faq-usage.rst b/src/doc/it/faq/faq-usage.rst index ef08c8835b0..13a2e0b7e5a 100644 --- a/src/doc/it/faq/faq-usage.rst +++ b/src/doc/it/faq/faq-usage.rst @@ -98,7 +98,7 @@ lancia i seguenti comandi dall'interfaccia a riga di comando di Sage:: import _tkinter import Tkinter -Se non ti viene segnalato alcun errore di ``ImportError`` +Se non ti viene segnalato alcun errore di :class:`ImportError` allora il problema è risolto. @@ -662,7 +662,7 @@ Con degli oggetti "a" e "b" ed una funzione "f" ho digitato accidentalmente "f(a Questo è dovuto a come sono definite le funzioni in Sage con la notazione ``f(x)=expr`` usando il preparser. Nota anche che se fai -quest'errore in un costrutto ``if``, avrai un errore ``SyntaxError`` +quest'errore in un costrutto ``if``, avrai un errore :class:`SyntaxError` prima di qualunque altro comportamento errato, quindi, in questo caso, non hai il problema. diff --git a/src/doc/ja/tutorial/interactive_shell.rst b/src/doc/ja/tutorial/interactive_shell.rst index cb1660e0a10..3d741045b22 100644 --- a/src/doc/ja/tutorial/interactive_shell.rst +++ b/src/doc/ja/tutorial/interactive_shell.rst @@ -391,7 +391,7 @@ IPythonのクイック レファレンスガイドを見たければ, ``%quick ===================== 処理中に何かまずいことが起きると,Pythonはふつう『例外』(exception)を発生し,その例外を引き起こした原因を教えてくれることもある. -よくお目にかかることになるのは, ``NameError`` や ``ValueError`` といった名称の例外だ(Pythonライブラリーリファレンス [PyLR]_ に例外名の包括的なリストがある). +よくお目にかかることになるのは, :class:`NameError` や :class:`ValueError` といった名称の例外だ(Pythonライブラリーリファレンス [PyLR]_ に例外名の包括的なリストがある). 実例を見てみよう: :: diff --git a/src/doc/pt/tutorial/interactive_shell.rst b/src/doc/pt/tutorial/interactive_shell.rst index 296701752d2..77fd02870e0 100644 --- a/src/doc/pt/tutorial/interactive_shell.rst +++ b/src/doc/pt/tutorial/interactive_shell.rst @@ -411,7 +411,7 @@ Erros e Exceções Quando algo errado ocorre, você usualmente verá uma "exceção" do Python. O Python até mesmo tenta sugerir o que ocasionou a exceção, -por exemplo, ``NameError`` ou ``ValueError`` (veja o Referência da +por exemplo, :class:`NameError` ou :class:`ValueError` (veja o Referência da Biblioteca Python [PyLR]_ para uma lista completa de exceções). Por exemplo, diff --git a/src/doc/ru/tutorial/interactive_shell.rst b/src/doc/ru/tutorial/interactive_shell.rst index e2d8a68cde6..13ea34f89db 100644 --- a/src/doc/ru/tutorial/interactive_shell.rst +++ b/src/doc/ru/tutorial/interactive_shell.rst @@ -357,8 +357,9 @@ Wall time. Однако, если существует существенная Когда что-то идет не так, обычно можно увидеть исключение Python (Python "exception"). Python даже попытается предположить, что вызвало ошибку. Часто -вы можете видеть имя исключения, например, ``NameError`` или ``ValueError`` -(см. Python Library Reference [PyLR]_ для полного списка исключений). Например, +вы можете видеть имя исключения, например, :class:`NameError` или +:class:`ValueError` (см. Python Library Reference [PyLR]_ для полного списка +исключений). Например, .. skip