Skip to content

Commit bb68b0f

Browse files
authored
Merge pull request #26 from object-oriented-python/edition_1.1
Edition 1.1
2 parents 168b11e + 3f1435d commit bb68b0f

25 files changed

+662
-480
lines changed

doc/source/0_preface.rst

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Preface
22
=======
33

4-
Computers have revolutionised mathematics and the many scientific, engineering
4+
Computers have revolutionised mathematics and the many scientific, engineering,
55
and economic fields in which mathematics is applied. In the applications of
66
mathematics the role of computation has long been obvious and prominent. Now,
77
the development of theorem proving software is increasing the prominence of
@@ -68,7 +68,7 @@ who would like to learn to be a more capable programmer. The mathematical
6868
examples assume that you know how to differentiate functions of one variable,
6969
but very little beyond that. Where examples or exercises employ other
7070
mathematics, such as cellular automata in :numref:`Chapter %s <style>` and
71-
groups in :numref:`Chapter %s <abstract_data_types>`, enough of the mathematics
71+
groups in :numref:`Chapter %s <inheritance>`, enough of the mathematics
7272
will be introduced that the reader should be able to understand the programming
7373
concept being explained, without necessarily understanding all of the
7474
mathematical details of the example.
@@ -78,7 +78,7 @@ the sort of basic Python usually covered in a first programming or
7878
computational methods course. In particular the reader will be assumed to be
7979
familiar with writing functions, variable assignments, loops, and list
8080
comprehensions. The reader is also assumed to have used numeric and string data
81-
values, as well as dictionaries, lists, and tuples.
81+
values, as well as dictionaries, sets, lists, and tuples.
8282

8383
Many introductory Python courses exclusively use Jupyter notebooks, so nothing
8484
beyond that is assumed. Getting set up with a working Python installation is
@@ -126,8 +126,8 @@ it's better to watch the video *after* reading the relevant section.
126126
The videos are marked in the text by a blue box at the right hand side,
127127
containing the video number. This corresponds to the list of links at:
128128

129-
`https://object-oriented-python.github.io/edition1/videos.html
130-
<https://object-oriented-python.github.io/edition1/videos.html>`__
129+
`https://object-oriented-python.github.io/edition2/videos.html
130+
<https://object-oriented-python.github.io/edition2/videos.html>`__
131131

132132
The exercises
133133
.............
@@ -141,8 +141,8 @@ correct responses to a range of inputs. Tests like this provide immediate
141141
feedback and enable you to know how you are doing. Links to the skeleton code
142142
for each chapter are provided at:
143143

144-
`https://object-oriented-python.github.io/edition1/exercises.html
145-
<https://object-oriented-python.github.io/edition1/exercises.html>`__
144+
`https://object-oriented-python.github.io/edition2/exercises.html
145+
<https://object-oriented-python.github.io/edition2/exercises.html>`__
146146

147147

148148
Conventions employed
@@ -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/10_further_object-oriented_features.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,9 @@ be observed if we try to instantiate :class:`~example_code.groups_abc.Group`:
327327
In [1]: from example_code.groups_abc import Group
328328
329329
In [2]: Group(1)
330-
---------------------------------------------------------------------------
331-
TypeError Traceback (most recent call last)
332-
<ipython-input-2-76d67216101e> in <module>
330+
--------------------------------------------------------------------------
331+
TypeError Traceback (most recent call last)
332+
Cell In [2], line 1
333333
----> 1 Group(1)
334334
335335
TypeError: Can't instantiate abstract class Group with abstract methods _validate, operation, symbol
@@ -570,7 +570,7 @@ Exercises
570570
.. only:: not book
571571

572572
Using the information on the `book website
573-
<https://object-oriented-python.github.io/edition1/exercises.html>`__
573+
<https://object-oriented-python.github.io/edition2/exercises.html>`__
574574
obtain the skeleton code for these exercises.
575575

576576
.. only:: book
@@ -613,5 +613,5 @@ Exercises
613613
in Python, so diving in and reading the source code is often an option if
614614
you really want to know how some part of the language works.
615615
616-
.. [#exercise_page] `https://object-oriented-python.github.io/edition1/exercises.html
617-
<https://object-oriented-python.github.io/edition1/exercises.html>`__
616+
.. [#exercise_page] `https://object-oriented-python.github.io/edition2/exercises.html
617+
<https://object-oriented-python.github.io/edition2/exercises.html>`__

doc/source/1_introduction.rst

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ tools. At various points you'll also need install several more Python packages,
7373
but you don't need to install those right now. The core tools you will need
7474
are:
7575

76-
1. Python version 3.6 or later.
76+
1. Python version 3.7 or later.
7777
2. Git (the revision control system we're going to use).
7878
3. A Python-aware text editor or :term:`integrated development
7979
environment` (IDE). Visual Studio Code is recommended, and all the
@@ -122,18 +122,12 @@ references in this book are to that version.
122122

123123
Within Python 3, there is a minor version release approximately every year.
124124
Once released, this receives security updates for 5 years. At the time of
125-
writing, Python 3.10 is the newest release version, and Python 3.6 is the
125+
writing, Python 3.11 is the newest release version, and Python 3.7 is the
126126
oldest version that still receives security fixes. The user-facing differences
127127
between minor Python versions are usually fairly minimal, so for the purposes
128128
of this book it doesn't matter which of the currently supported versions of
129129
Python you use.
130130

131-
.. warning::
132-
133-
The example code in the exercises uses :ref:`f-strings <tut-f-strings>`
134-
which were introduced in Python 3.6, so the code will not work in earlier
135-
versions of Python.
136-
137131
.. _create_venv:
138132

139133
Setting up a Python virtual environment

0 commit comments

Comments
 (0)