11Exceptions
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
88exceptions, and you can define new exceptions for your own purposes.
99
1010An 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
102101Checks
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 `?
0 commit comments