Skip to content

Commit e6f07e1

Browse files
committed
using new latexgit_py version that cleans paths in execution outputs
1 parent 6249135 commit e6f07e1

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# You can find it at https://thomasweise.github.io/latexgit_py,
77
# https://github.com/thomasWeise/latexgit_py, or at
88
# https://pypi.org/project/latexgit.
9-
latexgit == 0.8.23
9+
latexgit == 0.8.25
1010

1111
# minify_html is needed to minify html output.
1212
minify_html == 0.15.0

text/main/basics/collections/tuples/tuples.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
This is an exception which, unless properly caught and handled, will terminate the program immediately.
113113
\Cref{exec:tuples:tuples_3} shows us this.
114114
While the first two \pythonilIdx{print} commands still succeed, the program crashes when we lay our hands on the tuple directly.
115-
The \python\ interpreter is kind enough to print the error as well as where it happened.
115+
The \python\ interpreter is kind enough to print the error as well as where it happened (see also later in \cref{sec:exceptions}).
116116
This would help the programmer to find the problem.
117117

118118
Had the programmer used \mypy\ to check the code before running it, however, they would have found the error already.

text/main/basics/simpleDataTypesAndOperations/float/float.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@
365365
Trying to do that with a ten times larger number, i.e., computing \pythonil{17_976_931_348_623_157 * 10 ** 293 * 1.0} leads to an exception:
366366
The output is \pythonil{OverflowError: int too large to convert to float}\pythonIdx{OverflowError}.
367367
An exception terminates the current flow of execution and signals an error.
368-
We will learn later what exceptions actually are and how to handle them properly.
368+
Later in \cref{sec:exceptions}, we will learn what \pythonilsIdx{Exception} actually are and how to handle them properly.
369369

370370
The important thing to realize is that an overflow of a \pythonilIdx{float} may either lead to the \pythonilIdx{inf} value or to an error that stops your computation from continuing.
371371
As another example, let us again import the natural logarithm function \pythonilIdx{log} and the Euler's constant~\pythonilIdx{e} from the \pythonilIdx{math} module by doing \pythonil{from math import e, log}\pythonIdx{from}\pythonIdx{math}\pythonIdx{import}.

text/main/controlFlow/exceptions/exceptions.tex

+3-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@
172172

173173
It begins with the line \textil{Traceback (most recent call last):}.
174174
In the first line following this text, the source code file and the index of the line in that file where the \pythonilIdx{Exception} was originally raised are printed.
175-
The full path of the file may look a bit strange, since this book is compiled by a \github\ Action~\cite{C2024GA}, but at least the last part of the path, \textil{06_exceptions/use_sqrt_raise.py} clearly points out the calling program as the culprit \cref{lst:exceptions:use_sqrt_raise}.
175+
Notice that the actual path to the files will be different depending on where the source code of the examples is located.
176+
We replaced the variable part of the path with~\inQuotes{\{\dots\}}.
177+
The remaining part of the path, \textil{06_exceptions/use_sqrt_raise.py}, clearly points out the calling program as the culprit \cref{lst:exceptions:use_sqrt_raise}.
176178
Indeed, the following line of text identifies that instruction in \cref{lst:exceptions:use_sqrt_raise} that caused the error and even marks the offending function invocation by underlining it with \textil{{^}{^}{^}{^}{^}{^}{^}{^}{^}{^}{^}{^}}.
177179
Below that, we get to see the context of our \pythonil{sqrt} function:
178180
First, the path to its module is given (ending in \textil{06_exceptions/sqrt_raise.py}) and it is pointed out that the \pythonilIdx{Exception} was raised in line~15.

0 commit comments

Comments
 (0)