diff options
author | Stéphane Wirtel <stephane@wirtel.be> | 2018-10-26 10:52:11 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2018-10-26 10:52:11 (GMT) |
commit | e483f02423917dc4dfd25f46e5b9e6fce304777d (patch) | |
tree | 6171799d4ddcc72b7364a62b3f08a1fe124e8f6e /Doc/faq | |
parent | ddb961d2abe5d5fde76d85b21a77e4e91e0043ad (diff) | |
download | cpython-e483f02423917dc4dfd25f46e5b9e6fce304777d.zip cpython-e483f02423917dc4dfd25f46e5b9e6fce304777d.tar.gz cpython-e483f02423917dc4dfd25f46e5b9e6fce304777d.tar.bz2 |
bpo-35044, doc: Use the :exc: role for the exceptions (GH-10037)
Diffstat (limited to 'Doc/faq')
-rw-r--r-- | Doc/faq/design.rst | 2 | ||||
-rw-r--r-- | Doc/faq/extending.rst | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Doc/faq/design.rst b/Doc/faq/design.rst index 5e54df6..e2d63a0 100644 --- a/Doc/faq/design.rst +++ b/Doc/faq/design.rst @@ -528,7 +528,7 @@ Some unacceptable solutions that have been proposed: mydict = {[1, 2]: '12'} print(mydict[[1, 2]]) - would raise a KeyError exception because the id of the ``[1, 2]`` used in the + would raise a :exc:`KeyError` exception because the id of the ``[1, 2]`` used in the second line differs from that in the first line. In other words, dictionary keys should be compared using ``==``, not using :keyword:`is`. diff --git a/Doc/faq/extending.rst b/Doc/faq/extending.rst index fd04a83..b611bb4 100644 --- a/Doc/faq/extending.rst +++ b/Doc/faq/extending.rst @@ -63,7 +63,7 @@ How can I execute arbitrary Python statements from C? The highest-level function to do this is :c:func:`PyRun_SimpleString` which takes a single string argument to be executed in the context of the module ``__main__`` and returns ``0`` for success and ``-1`` when an exception occurred -(including ``SyntaxError``). If you want more control, use +(including :exc:`SyntaxError`). If you want more control, use :c:func:`PyRun_String`; see the source for :c:func:`PyRun_SimpleString` in ``Python/pythonrun.c``. |