Skip to content

Commit c4791d1

Browse files
committed
massive refactoring to allow more flexible addition and exchange of chapters in the future
1 parent 419ce6e commit c4791d1

File tree

21 files changed

+148
-148
lines changed

21 files changed

+148
-148
lines changed

notation/terms.sty

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ text={\softwareStyle{Java}},%
186186
name={Java},%
187187
sort={Java},%
188188
description={%
189-
is another very success programming language, with roots in the \pgls{C}~family of languages~\cite{LNL2020LJ,B2008EJ}.%
189+
is another very successful programming language, with roots in the \pgls{C}~family of languages~\cite{LNL2020LJ,B2008EJ}.%
190190
}%
191191
}%
192192
%

styles/listing.sty

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ $\downarrow$~~\expandafter\bashil{bash #3}~~$\downarrow$%
327327
\gitLoad{#1}{#2/#3}{python3 -m latexgit.formatters.python #4}%
328328
\expandafter\expandafter\expandafter\edef\expandafter\csname @pwp@gitUrl:lst:#5\endcsname{\gitUrl}%
329329
\expandafter\expandafter\expandafter\edef\expandafter\csname @pwp@gitFile:lst:#5\endcsname{\gitFile}%
330-
\gitExec{#1}{.}{./scripts/pythonIgnoreErrors.sh #2 #3}%
330+
\gitExec{#1}{.}{./_scripts_/pythonIgnoreErrors.sh #2 #3}%
331331
\expandafter\expandafter\expandafter\edef\expandafter\csname @pwp@gitFile:exec:#5\endcsname{\gitFile}%
332332
%
333333
\begin{figure}[tb]%

text/back/scripts.tex

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
\hsection{Scripts}%
22
%
3-
\gitBash{\programmingWithPythonCodeRepo}{scripts/mypy.sh}{bash:mypy}{%
3+
\gitBash{\programmingWithPythonCodeRepo}{_scripts_/mypy.sh}{bash:mypy}{%
44
A \bash\ script for executing \mypy, which prints the command line and the exit code; see \cref{ut:mypy}.}%
55
%
6-
\gitBash{\programmingWithPythonCodeRepo}{scripts/ruff.sh}{bash:ruff}{%
6+
\gitBash{\programmingWithPythonCodeRepo}{_scripts_/ruff.sh}{bash:ruff}{%
77
A \bash\ script for executing \ruff, which prints the command line and the exit code; see \cref{ut:ruff}.}%
88
%
9-
\gitBash{\programmingWithPythonCodeRepo}{scripts/pylint.sh}{bash:pylint}{%
9+
\gitBash{\programmingWithPythonCodeRepo}{_scripts_/pylint.sh}{bash:pylint}{%
1010
A \bash\ script for executing \pylint, which prints the command line and the exit code; see \cref{ut:pylint}.}%
1111
%
12-
\gitBash{\programmingWithPythonCodeRepo}{scripts/pytest.sh}{bash:pytest}{%
12+
\gitBash{\programmingWithPythonCodeRepo}{_scripts_/pytest.sh}{bash:pytest}{%
1313
A \bash\ script for executing test cases with \pytest, which prints the command line and the exit code; see \cref{ut:pytest}.}%
1414
%
15-
\gitBash{\programmingWithPythonCodeRepo}{scripts/pytest_doctest.sh}{bash:pytest_doctest}{%
15+
\gitBash{\programmingWithPythonCodeRepo}{_scripts_/pytest_doctest.sh}{bash:pytest_doctest}{%
1616
A \bash\ script for executing \pglspl{doctest} with \pytest, which prints the command line and the exit code; see \cref{ut:doctest}.}%
1717
%
1818
Here we provide some scripts that are used within this book.

text/main/basics/collections/dictionaries/dictionaries.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
\hsection{Dictionaries}%
22
\label{sec:dictionaries}%
33
%
4-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{02_collections}{dicts_1.py}{--args format}{dicts:dicts_1}{%
4+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{collections}{dicts_1.py}{--args format}{dicts:dicts_1}{%
55
An example of using dictionaries in \python.}%
66
%
77
Dictionaries in \python\ are containers that store key-value pairs.

text/main/basics/collections/lists/lists.tex

+9-9
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
\hsection{Basic Functionality and Examples}%
88
\label{sec:lists:basicFunctions}%
99
%
10-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{02_collections}{lists_1.py}{--args format}{lists:lists_1}{%
10+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{collections}{lists_1.py}{--args format}{lists:lists_1}{%
1111
A first example for using lists in \python: creating, indexing, printing of and appending elements and other lists to lists.}%
1212
%
13-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{02_collections}{lists_2.py}{--args format}{lists:lists_2}{%
13+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{collections}{lists_2.py}{--args format}{lists:lists_2}{%
1414
A second example of using lists in \python: inserting and deleting elements, sorting and reversing lists.}%
1515
%
16-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{02_collections}{lists_3.py}{--args format}{lists:lists_3}{%
16+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{collections}{lists_3.py}{--args format}{lists:lists_3}{%
1717
A third example of using lists in \python: slicing, adding, and multiplying lists.}%
1818
%
1919
In \cref{lst:lists:lists_1}, we provide some first examples for using lists.
@@ -143,7 +143,7 @@
143143
\hsection{An Example of Errors and a new Tool}%
144144
\label{sec:listExampleForErrorsAndRuff}%
145145
%
146-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{02_collections}{lists_error.py}{--args format}{lists:lists_error}{%
146+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{collections}{lists_error.py}{--args format}{lists:lists_error}{%
147147
A program processing lists which exhibits some subtle errors and inefficiencies.}
148148

149149
Now, in the previous chapter, we learned that static code analysis tools can help us to discover subtle problems in our programs.
@@ -153,7 +153,7 @@
153153
It does not have any \emph{error} in the strict sense.
154154
We can execute it just fine and it will produce the output \textil{[1, 2, 3]} as shown in \cref{exec:lists:lists_error}.
155155

156-
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{scripts/mypy.sh 02_collections lists_error.py}{lists:lists_error:mypy}{%
156+
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{_scripts_/mypy.sh collections lists_error.py}{lists:lists_error:mypy}{%
157157
The results of static type checking with \mypy\ of the program given in \cref{lst:lists:lists_error}.}
158158

159159
However, upon closer inspection, we discover some issues.
@@ -179,7 +179,7 @@
179179
We provide a script for using \ruff\ with a reasonable default configuration in \cref{lst:bash:ruff} on \cpageref{lst:bash:ruff}.%
180180
}%
181181
%
182-
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{scripts/ruff.sh 02_collections lists_error.py}{lists:lists_error:ruff}{%
182+
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{_scripts_/ruff.sh collections lists_error.py}{lists:lists_error:ruff}{%
183183
The results of linting with \ruff\ of the program given in \cref{lst:lists:lists_error}. (We used the script given in \cref{lst:bash:ruff} on \cpageref{lst:bash:ruff} to apply \ruff.)}%
184184
%
185185
Let us apply \ruff\ to the program \textil{lists_error.py} given in \cref{lst:lists:lists_error}, which produces the output \cref{exec:lists:lists_error:ruff}.
@@ -199,7 +199,7 @@
199199
It basically creates a list via \pythonil{[1, 2, 3]} and then immediately makes a copy of it via the \pythonilIdx{list} function wrapped around the list specification.
200200
We can leave this outer call to \pythonil{list} away.
201201

202-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{02_collections}{lists_fixed.py}{--args format}{lists:lists_fixed}{%
202+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{collections}{lists_fixed.py}{--args format}{lists:lists_fixed}{%
203203
The corrected version of~\cref{lst:lists:lists_error}, taking into account the information given by \mypy\ in \cref{exec:lists:lists_error:mypy} and \ruff\ in \cref{exec:lists:lists_error:ruff}.}%
204204
%
205205
%
@@ -220,10 +220,10 @@
220220
%
221221
\FloatBarrier%
222222
%
223-
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{scripts/mypy.sh 02_collections lists_fixed.py}{lists:lists_fixed:mypy}{%
223+
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{_scripts_/mypy.sh collections lists_fixed.py}{lists:lists_fixed:mypy}{%
224224
The results of static type checking with \mypy\ of the program given in \cref{lst:lists:lists_fixed}.}%
225225
%
226-
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{scripts/ruff.sh 02_collections lists_fixed.py}{lists:lists_fixed:ruff}{%
226+
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{_scripts_/ruff.sh collections lists_fixed.py}{lists:lists_fixed:ruff}{%
227227
The results of static type checking with \ruff\ of the program given in \cref{lst:lists:lists_fixed}.}
228228

229229
Well, this was only a two-line program.

text/main/basics/collections/sets/sets.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
\hsection{Sets}%
22
\label{sec:sets}%
33
%
4-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{02_collections}{sets_1.py}{--args format}{sets:sets_1}{%
4+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{collections}{sets_1.py}{--args format}{sets:sets_1}{%
55
A first example of using sets in \python: creating, modifying, and converting sets. %
66
Since sets are unordered, printing them can yield a different result each time a program is executed (see \cref{bp:setsUnordered}).}%
77
%
8-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{02_collections}{sets_2.py}{--args format}{sets:sets_2}{%
8+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{collections}{sets_2.py}{--args format}{sets:sets_2}{%
99
A second example of using sets in \python: creating sets and set operations (as illustrated in \cref{fig:setOperations}). %
1010
Since sets are unordered, printing them can yield a different result each time a program is executed (see \cref{bp:setsUnordered}).}%
1111
%

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
\hsection{Tuples}%
22
\label{sec:tuples}%
33
%
4-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{02_collections}{tuples_1.py}{--args format}{tuples:tuples_1}{%
4+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{collections}{tuples_1.py}{--args format}{tuples:tuples_1}{%
55
A first example of using tuples in \python: creating, indexing, and printing of tuples.}%
66
%
7-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{02_collections}{tuples_2.py}{--args format}{tuples:tuples_2}{%
7+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{collections}{tuples_2.py}{--args format}{tuples:tuples_2}{%
88
A second example of using tuples in \python: tuples with elements of different types and tuple unpacking.}%
99
%
10-
\gitPythonAndErrorOutput{\programmingWithPythonCodeRepo}{02_collections}{tuples_3.py}{--args format}{tuples:tuples_3}{%
10+
\gitPythonAndErrorOutput{\programmingWithPythonCodeRepo}{collections}{tuples_3.py}{--args format}{tuples:tuples_3}{%
1111
A third example of using tuples in \python: testing the immutability property.}%
1212
%
13-
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{scripts/mypy.sh 02_collections tuples_3.py}{tuples:tuples_3:mypy}{%
13+
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{_scripts_/mypy.sh collections tuples_3.py}{tuples:tuples_3:mypy}{%
1414
The results of static type checking with \mypy\ of the program given in \cref{lst:tuples:tuples_3}.}%
1515
%
1616
\pythonIdx{tuple}%

text/main/basics/gettingStarted/firstProgram/firstProgram.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
This program should just print \inQuotes{Hello World!} to the text output and then exit.
77
It therefore will consist of the single statement \pythonil{print("Hello World!")}, as illustrated in \cref{lst:very_first_program}.
88

9-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{00_veryFirstProject}{very_first_program.py}{--args format}{very_first_program}{%
9+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{veryFirstProject}{very_first_program.py}{--args format}{very_first_program}{%
1010
Our very first \python\ program, which just prints \inQuotes{Hello World!}}%
1111
%
1212
\begin{figure}%

text/main/basics/variables/assignment/assignment.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Here, \pythonil{name} is the name of the variable and \pythonil{value} be the value that we want to assign to that name.%
77
%
88
\hsection{A Simple Example of Variable Assignment and Comments in the Code}%
9-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{01_variables}{assignment.py}{--args format}{variables:assignment}{%
9+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{variables}{assignment.py}{--args format}{variables:assignment}{%
1010
A \python\ program showing some examples for variable assignments.}%
1111
%
1212
\begin{figure}[tb]%
@@ -232,7 +232,7 @@
232232
\pi_{2e} &= \frac{e}{2} s_{2e}\label{eq:liuhui:approx}%
233233
\end{align}%
234234
%
235-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{01_variables}{pi_liu_hui.py}{--args format}{variables:pi_liu_hui}{%
235+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{variables}{pi_liu_hui.py}{--args format}{variables:pi_liu_hui}{%
236236
A \python\ program showing several steps of the approximation of~\numberPi\ using the method of LIU Hui.}%
237237
%
238238
\begin{figure}[tb]%

text/main/basics/variables/identity/identity.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
\label{fig:variables:equalityAndIdentity}%
2222
\end{figure}%
2323
%
24-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{01_variables}{identity_1.py}{--args format}{variables:identity_1}{%
24+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{variables}{identity_1.py}{--args format}{variables:identity_1}{%
2525
An example of the difference between equality and identity\pythonIdx{sqrt}.}%
2626
%
27-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{01_variables}{identity_2.py}{--args format}{variables:identity_2}{%
27+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{variables}{identity_2.py}{--args format}{variables:identity_2}{%
2828
An second example of the difference between equality and identity.}%
2929
%
3030
We use variables to references objects in memory.

text/main/basics/variables/multiAndSwap/multiAndSwap.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
\hsection{Multiple Assignments and Value Swapping}%
22
%
3-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{01_variables}{multi_and_swap.py}{--args format}{variables:multi_and_swap}{%
3+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{variables}{multi_and_swap.py}{--args format}{variables:multi_and_swap}{%
44
A \python\ program assigning multiple values to multiple variables and using the same method to swap variable values.}%
55
%
66
In \python, we can assign values to multiple variables at once.

text/main/basics/variables/typesAndTypeHints/typesAndTypeHints.tex

+10-10
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
\label{sec:variableTypesAndTypeHints}%
33
%
44
\hsection{Variable Types}%
5-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{01_variables}{variable_types.py}{--args format}{variables:types}{%
5+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{variables}{variable_types.py}{--args format}{variables:types}{%
66
An example of the types of variables.}%
77
%
88
A variable is basically a name pointing to an object.
@@ -15,7 +15,7 @@
1515
%
1616
\hsection{Types and Confusion}%
1717
\label{sec:typesAndConfusion}%
18-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{01_variables}{variable_types_wrong.py}{--args format}{variables:types_wrong}{%
18+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{variables}{variable_types_wrong.py}{--args format}{variables:types_wrong}{%
1919
An example of the confusing variable types.}
2020

2121
Well, actually, there is.
@@ -86,11 +86,11 @@
8686
\label{fig:pipInstallMypy}%
8787
\end{figure}%
8888
%
89-
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{scripts/mypy.sh 01_variables variable_types_wrong.py}{variables:variable_types_wrong:mypy}{%
89+
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{_scripts_/mypy.sh variables variable_types_wrong.py}{variables:variable_types_wrong:mypy}{%
9090
The results of static type checking with \mypy\ of the program given in \cref{lst:variables:types_wrong}. %
9191
(This is actually output generated by the script~\cref{lst:bash:mypy} on \cpageref{lst:bash:mypy}.)}%
9292
%
93-
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{scripts/mypy.sh 01_variables variable_types.py}{variables:variable_types:mypy}{%
93+
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{_scripts_/mypy.sh variables variable_types.py}{variables:variable_types:mypy}{%
9494
The results of static type checking with \mypy\ of the program given in \cref{lst:variables:types}. %
9595
(This is actually output generated by the script~\cref{lst:bash:mypy} on \cpageref{lst:bash:mypy}.)}%
9696
%
@@ -166,16 +166,16 @@
166166
However, by writing \pythonil{: int}\pythonIdx{:} after its name, we also clearly establish our intention.
167167
And this makes a difference.
168168

169-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{01_variables}{variable_types_wrong_hints_1.py}{--args format}{variables:types_wrong_hints_1}{%
169+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{variables}{variable_types_wrong_hints_1.py}{--args format}{variables:types_wrong_hints_1}{%
170170
\cref{lst:variables:types_wrong}, but with the variable explicitly hinted as \pythonil{int}.}%
171171
%%
172-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{01_variables}{variable_types_wrong_hints_2.py}{--args format}{variables:types_wrong_hints_2}{%
172+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{variables}{variable_types_wrong_hints_2.py}{--args format}{variables:types_wrong_hints_2}{%
173173
\cref{lst:variables:types_wrong}, but with the variable explicitly hinted as either \pythonil{int} or \pythonil{float} and named appropriately.}%
174174
%
175-
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{scripts/mypy.sh 01_variables variable_types_wrong_hints_1.py}{variables:variable_types_wrong_hints_1:mypy}{%
175+
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{_scripts_/mypy.sh variables variable_types_wrong_hints_1.py}{variables:variable_types_wrong_hints_1:mypy}{%
176176
The results of static type checking with \mypy\ of the program given in \cref{lst:variables:types_wrong_hints_1}.}%
177177
%
178-
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{scripts/mypy.sh 01_variables variable_types_wrong_hints_2.py}{variables:variable_types_wrong_hints_2:mypy}{%
178+
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{_scripts_/mypy.sh variables variable_types_wrong_hints_2.py}{variables:variable_types_wrong_hints_2:mypy}{%
179179
The results of static type checking with \mypy\ of the program given in \cref{lst:variables:types_wrong_hints_2}.}%%
180180

181181
If the author of \cref{lst:variables:types_wrong} had used \pglspl{typeHint}, they could have written their program differently, as illustrated in \cref{lst:variables:types_wrong_hints_1,lst:variables:types_wrong_hints_2}.
@@ -205,10 +205,10 @@
205205
%
206206
\bestPractice{typeHints}{Always use \pglspl{typeHint}.}%
207207
%
208-
\gitPython{\programmingWithPythonCodeRepo}{01_variables/variable_types_hints.py}{--args format}{variables:types_hints}{%
208+
\gitPython{\programmingWithPythonCodeRepo}{variables/variable_types_hints.py}{--args format}{variables:types_hints}{%
209209
A variant of \cref{lst:variables:types} which has been improved by adding type annotations.}%
210210
%
211-
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{scripts/mypy.sh 01_variables variable_types_hints.py}{variables:variable_types_hints:mypy}{%
211+
\gitOutputTool{\programmingWithPythonCodeRepo}{.}{_scripts_/mypy.sh variables variable_types_hints.py}{variables:variable_types_hints:mypy}{%
212212
The results of static type checking with \mypy\ of the program given in \cref{lst:variables:types_hints}.}
213213

214214
For the sake of completeness, let us also annotate \cref{lst:variables:types} with \pglspl{typeHint} as a small exercise.

text/main/classes/basics/basics.tex

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@
7070
\hsection{A Simple Immutable Class for Points in the Two-Dimensional Euclidean Plane}%
7171
\label{sec:immutableClassPoints2D}%
7272
%
73-
\gitPython{\programmingWithPythonCodeRepo}{08_classes/point.py}{--args format}{classes:point}{%
73+
\gitPython{\programmingWithPythonCodeRepo}{classes/point.py}{--args format}{classes:point}{%
7474
A class for representing points in the two-dimensional Euclidean plane.}%
7575
%
76-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{08_classes}{point_user.py}{--args format}{classes:point_user}{%
76+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{classes}{point_user.py}{--args format}{classes:point_user}{%
7777
An example of using our new \pythonil{class Point} from \cref{lst:classes:point}.}%
7878
%
7979
We begin directly with an example.
@@ -346,10 +346,10 @@
346346
}% end for
347347
}% end algorithm
348348
%
349-
\gitPython{\programmingWithPythonCodeRepo}{08_classes/kahan_sum.py}{--args format}{classes:kahan_sum}{%
349+
\gitPython{\programmingWithPythonCodeRepo}{classes/kahan_sum.py}{--args format}{classes:kahan_sum}{%
350350
An implementation of the second-order \citeauthor{K1965PFRORTE}-\citeauthor{B1968NSIMA}-\citeauthor{N1974REVZSES} summation algorithm given in \cref{algo:kahanSum}.}%
351351
%
352-
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{08_classes}{kahan_user.py}{--args format}{classes:kahan_user}{%
352+
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{classes}{kahan_user.py}{--args format}{classes:kahan_user}{%
353353
Some use cases of our \citeauthor{K1965PFRORTE}-summation class from \cref{lst:classes:kahan_sum} and a comparison with \python's \pythonilIdx{sum} and the function~\pythonilIdx{fsum} from the \pythonilIdx{math} module.}%
354354

355355
Luckily, in the 1960s, \citeauthor{K1965PFRORTE}~\cite{K1965PFRORTE} and \citeauthor{B1968NSIMA}~\cite{B1968NSIMA} had an idea how to fix that:

0 commit comments

Comments
 (0)