Skip to content

Commit 5bd93ff

Browse files
committed
preface and minor fixes
1 parent a9588cb commit 5bd93ff

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

doc/source/0_preface.rst

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ outstanding. Pulling out all the stops to deliver the written and video
202202
materials for online learning meant a lot of evenings and weekends. I am
203203
exceptionally grateful to my wife Gebina Ham for disproportionately picking up
204204
our childcare responsibilities in that period in order to make this possible.
205-
I'd also like to thank Dr Aaron Pereira for his eagle-eyed corrections to the
206-
text.
205+
I'd also like to thank Dr Aaron Pereira and Reuben Nixon-Hill for their
206+
eagle-eyed corrections to the text.
207207

208208
This is a textbook about programming in Python, so it would be remiss of me not
209209
to also thank the developers of the Python language, its CPython reference
@@ -215,3 +215,14 @@ This book is typeset using the Sphinx documentation system. Among other things
215215
this facilitates generating the web, PDF, and print versions of the book from a
216216
single source. Thanks are due to its authors as well as those of the underlying
217217
LaTeX and TeX typesetting systems.
218+
219+
Changes in the second edition
220+
-----------------------------
221+
222+
The second edition is a minor update correcting numerous small issues that have
223+
been pointed out over the last year. A more substantive change is that the
224+
explanation of packaging in :numref:`programs_files` has been modernised to use
225+
:file:`pyproject.toml` in place of `setup.py`.
226+
:numref:`assignment_and_instantiation` has been added in response to confusion
227+
expressed by a number of students about the distinction between instantiating
228+
new objects and assigning new variable names to existing objects.

doc/source/3_objects.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,9 @@ object-oriented programming. In particular, encapsulation is key to
801801
creating single objects representing high level mathematical
802802
abstractions whose concrete realisation in code may require many
803803
pieces of data and a large number of complex functions.
804-
804+
805+
.. _assignment_and_instantiation:
806+
805807
Assignment and instantiation
806808
----------------------------
807809

doc/source/9_trees_and_directed_acyclic_graphs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ become apparent that it is not always possible to do so.
325325
326326
def __init__(self, value, *children):
327327
self.value = value
328-
self.children = tuple(children)
328+
self.children = children
329329
330330
def __repr__(self):
331331
"""Return the canonical string representation."""

example_code/graphs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class TreeNode:
1616

1717
def __init__(self, value, *children):
1818
self.value = value
19-
self.children = tuple(children)
19+
self.children = children
2020

2121
def __repr__(self):
2222
"""Return the canonical string representation."""

0 commit comments

Comments
 (0)