Skip to content

Commit c1f9d26

Browse files
committed
improved list comprehension text
1 parent c29c52a commit c1f9d26

File tree

6 files changed

+79
-53
lines changed

6 files changed

+79
-53
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ Die Slides zum Kurs in deutscher Sprache können unter <https://thomasweise.gith
5555
30. [Funktionen als Parameter, `Callable`s und `lambda`s](https://thomasweise.github.io/programmingWithPythonSlidesDE/30_callables_und_lambdas.pdf)
5656
31. [Ausnahmen auslösen](https://thomasweise.github.io/programmingWithPythonSlidesDE/31_ausnahmen_auslösen.pdf)
5757
32. [Ausnahmen verarbeiten](https://thomasweise.github.io/programmingWithPythonSlidesDE/32_ausnahmen_verarbeiten.pdf)
58+
33. [Zwischenspiel: Testen auf Ausnahmen](https://thomasweise.github.io/programmingWithPythonSlidesDE/33_testen_auf_ausnahmen.pdf)
59+
34. [Iteration](https://thomasweise.github.io/programmingWithPythonSlidesDE/34_iteration.pdf)
60+
35. [List Comprehension](https://thomasweise.github.io/programmingWithPythonSlidesDE/35_list_comprehension.pdf)
5861

5962

6063
### 2.3. The Slides in English

bookbase

text/main/classes/basics/basics.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
A second situation where ability to define functions and we have learned so far hits a limit arises with \pglspl{API}.
2424
Let us be ambitious and imagine that you wanted to create a versatile system that can produce documents.
25-
On the output side, you want to support different formats, say LibreOffice~\cite{DF2024LTDF,GL2012LTSOOSSCBAFACSOL}, Microsoft~Word~\cite{MS2024MW,DR2019STFAWAUMW}, and Adobe~PDF~\cite{A2024WDPM,A2008P3DMPDFP1P1}.
25+
On the output side, you want to support different formats, say LibreOffice~\cite{DF2024LTDF,GL2012LTSOOSSCBAFACSOL}, Microsoft~Word~\cite{MS2024MW,DR2019STFAWAUMW}, and Adobe~\pgls{formatPDF}~\cite{A2024WDPM,A2008P3DMPDFP1P1}.
2626
On the input side, you would like to provide the user with a uniform way to create documents, to add text paragraphs, to insert graphics, to set the font of texts, and so on.
2727
This input side \pgls{API} should be the same for all output formats.
2828
It would not just consist of a single function, but several groups of functions.

text/main/classes/inheritance/inheritance.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
It would probably provide another method to draw a line of a certain width and color connecting two points.
167167
You could define this as a class with (at least) two methods \pythonil{draw_line} and \pythonil{draw_rectangle}.
168168
We could then go an implement these methods in a class in such a way that constructs an SVG graphic~\cite{DDGLMSWFJJ2011SVGSSE} in memory.
169-
Another implementation could instead construct an Adobe~PDF~\cite{A2024WDPM,A2008P3DMPDFP1P1} graphic.
169+
Another implementation could instead construct an Adobe~\pgls{formatPDF}~\cite{A2024WDPM,A2008P3DMPDFP1P1} graphic.
170170
While doing this would be more complex and exceed the space that we can reasonable use for an example in this book, the principle of the approach would not be very different from what you have already learned here.%
171171
\endhsection%
172172
%

text/main/controlFlow/functions/functions.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,11 +710,11 @@
710710
%
711711
\gitLoadPython{functions:normal_pdf}{}{functions/normal_pdf.py}{}%
712712
\listingPython{functions:normal_pdf}{%
713-
Implementing the probability density function~(PDF) of the normal distribution as function with default argument values.\pythonIdx{pi}\pythonIdx{exp}\pythonIdx{sqrt}}%
713+
Implementing the \glsFull{mathPdf} of the normal distribution as function with default argument values.\pythonIdx{pi}\pythonIdx{exp}\pythonIdx{sqrt}}%
714714
%
715715
\gitLoadAndExecPython{functions:use_normal_pdf}{}{functions}{use_normal_pdf.py}{}%
716716
\listingPythonAndOutput{functions:use_normal_pdf}{%
717-
Using the PDF of the normal distribution implemented in \cref{lst:functions:normal_pdf}.}{}%
717+
Using the \pgls{mathPDF} of the normal distribution implemented in \cref{lst:functions:normal_pdf}.}{}%
718718
%
719719
After the discussion of \pglspl{unitTest}, let us now come to a lighter topic: passing arguments to functions.
720720
We have already seen many examples for this.

0 commit comments

Comments
 (0)