Skip to content

Commit 283bb92

Browse files
committed
🎨 Rearrange glossaries
1 parent 32a22af commit 283bb92

File tree

15 files changed

+741
-569
lines changed

15 files changed

+741
-569
lines changed

docs/appendix/glossary.rst

Lines changed: 707 additions & 0 deletions
Large diffs are not rendered by default.

docs/appendix/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ Appendix
44
.. toctree::
55
:titlesonly:
66

7+
glossary
78
checks

docs/control-flow/exceptions.rst

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Exceptions
22
==========
33

4-
This section deals with exceptions, which are language functions that
5-
specifically handle unusual circumstances during the execution of a programme.
6-
The most common exception is error handling, but they can also be used
7-
effectively for many other purposes. Python provides a comprehensive set of
4+
This section deals with :term:`exceptions <exception>`, which are language
5+
functions that specifically handle unusual circumstances during the execution of
6+
a programme. The most common exception is error handling, but they can also be
7+
used effectively for many other purposes. Python provides a comprehensive set of
88
exceptions, and you can define new exceptions for your own purposes.
99

1010
An exception is an object that is automatically created by Python functions with
@@ -90,14 +90,13 @@ Line 19
9090
The way Python handles error situations in general differs from some other
9191
languages, such as Java. These languages check possible errors as far as
9292
possible before they occur, as handling exceptions after they occur is
93-
costly. This is sometimes referred to as the :abbr:`LBYL (Look before you
94-
leap)` approach.
93+
costly. This is sometimes referred to as the :term:`LBYL` approach.
9594

9695
Python, on the other hand, relies more on exceptions to handle errors after
9796
they occur. Although this reliance may seem risky, when exceptions are used
9897
correctly, the code is less cumbersome and easier to read, and errors are
9998
only handled when they occur. This Pythonic approach to error handling is
100-
often described as :abbr:`EAFP (easier to ask forgiveness than permission)`.
99+
often described as :term:`EAFP`.
101100

102101
Checks
103102
------
@@ -117,5 +116,4 @@ Checks
117116
the variable ``x`` is greater or less than ``3``?
118117

119118
* Is the check whether an object is a list (:ref:`Check: list <check-list>`)
120-
programming in the style of :abbr:`LBYL (look before you leap)` or
121-
:abbr:`EAFP (easier to ask forgiveness than permission)`?
119+
programming in the style of :term:`LBYL` or :term:`EAFP`?

docs/control-flow/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Control flow
22
============
33

4-
Python has a whole range of structures for controlling code execution and
5-
programme flow, including common branches and loops:
4+
Python has a whole range of :term:`control flows <Control flow>` to control code
5+
execution and programme flow, including common branches and loops:
66

77
:doc:`boolean`
88
check values and identity and allow links between the two.

docs/functions/params.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
Parameters
22
==========
33

4-
Python offers flexible mechanisms for passing arguments to functions:
4+
Python offers flexible mechanisms for passing :term:`arguments <argument>` to
5+
:term:`functions <function>`:
56

67
.. code-block:: pycon
78
:linenos:

0 commit comments

Comments
 (0)