Skip to content

Commit 6535af9

Browse files
committed
minor fixes
1 parent 139cac7 commit 6535af9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

text/main/classes/inheritance/inheritance.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
The class \pythonil{Triangle} is implemented in very much the same fashion.
136136
This time, we need to store all three corner points (and also return all of them in the \pythonil{points}~method implementation).
137137
There also is no better way for computing the perimeter than what \pythonil{Polygon} already provides, so we this time do not override~\pythonil{perimeter}.
138-
The area computation is implemented using the formula~$A=x_1(y2-y3)+x_2(y_3-y_1)+x_3(y_1-y_2)$ you probably remember from high school maths.
138+
The area computation is implemented using the formula~$A=x_1(y_2-y_3)+x_2(y_3-y_1)+x_3(y_1-y_2)$ you probably remember from high school maths.
139139

140140
Notice that both subclasses of \pythonil{Polygon} offer some \pglspl{doctest} in the \pglspl{docstring}.
141141
While I needed to keep the \pglspl{docstring} short to be able to fit the listings on pages, these \pglspl{doctest} still are instructive for the user.%
@@ -161,7 +161,7 @@
161161
You could define this as a class with (at least) two methods \pythonil{draw_line} and \pythonil{draw_rectangle}.
162162
We could then go an implement these methods in a class in such a way that constructs an SVG graphic~\cite{DDGLMSWFJJ2011SVGSSE} in memory.
163163
Another implementation could instead construct an Adobe~PDF~\cite{A2024WDPM,A2008P3DMPDFP1P1} graphic.
164-
While doing this would be more complex and exceed the space that we can reasonable use for an example in this book, the principle approach would not be very different from what you have already learned here.%
164+
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.%
165165
\endhsection%
166166
%
167167
\FloatBarrier%

text/main/controlFlow/exceptions/exceptions.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@
533533

534534
We open the file \textil{example.txt} for writing.
535535
To do so, we call the built-in function~\pythonilIdx{open}.
536-
We pass in the filename~\pythonIdx{"example.txt"} as first parameter.
536+
We pass in the filename~\textil{"example.txt"} as first parameter.
537537
The second parameter, \pythonil{mode}\pythonIdx{open!mode}, is set to~\pythonil{"w"}, which means \inQuotes{open for writing.}
538538
The parameter \pythonil{encoding}\pythonIdx{open!encoding} is set to~\pythonil{"UTF-8"}\pythonIdx{UTF-8}, which defines that the text should be translated to binary form when it is stored in the file via the usual \pgls{utf8}~encoding~\cite{Y2003UATFOI1,ISOIEC106462020ITUCCSU}.
539539
This is of no importance here and we will discuss this eventually later in the book.

0 commit comments

Comments
 (0)