Skip to content

Second Edition #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 20 additions & 9 deletions doc/source/0_preface.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Preface
=======

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

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

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

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

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


Conventions employed
Expand Down Expand Up @@ -202,8 +202,8 @@ outstanding. Pulling out all the stops to deliver the written and video
materials for online learning meant a lot of evenings and weekends. I am
exceptionally grateful to my wife Gebina Ham for disproportionately picking up
our childcare responsibilities in that period in order to make this possible.
I'd also like to thank Dr Aaron Pereira for his eagle-eyed corrections to the
text.
I'd also like to thank Dr Aaron Pereira and Reuben Nixon-Hill for their
eagle-eyed corrections to the text.

This is a textbook about programming in Python, so it would be remiss of me not
to also thank the developers of the Python language, its CPython reference
Expand All @@ -215,3 +215,14 @@ This book is typeset using the Sphinx documentation system. Among other things
this facilitates generating the web, PDF, and print versions of the book from a
single source. Thanks are due to its authors as well as those of the underlying
LaTeX and TeX typesetting systems.

Changes in the second edition
-----------------------------

The second edition is a minor update correcting numerous small issues that have
been pointed out over the last year. A more substantive change is that the
explanation of packaging in :numref:`programs_files` has been modernised to use
:file:`pyproject.toml` in place of `setup.py`.
:numref:`assignment_and_instantiation` has been added in response to confusion
expressed by a number of students about the distinction between instantiating
new objects and assigning new variable names to existing objects.
12 changes: 6 additions & 6 deletions doc/source/10_further_object-oriented_features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,9 @@ be observed if we try to instantiate :class:`~example_code.groups_abc.Group`:
In [1]: from example_code.groups_abc import Group

In [2]: Group(1)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-76d67216101e> in <module>
--------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In [2], line 1
----> 1 Group(1)

TypeError: Can't instantiate abstract class Group with abstract methods _validate, operation, symbol
Expand Down Expand Up @@ -570,7 +570,7 @@ Exercises
.. only:: not book

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

.. only:: book
Expand Down Expand Up @@ -613,5 +613,5 @@ Exercises
in Python, so diving in and reading the source code is often an option if
you really want to know how some part of the language works.

.. [#exercise_page] `https://object-oriented-python.github.io/edition1/exercises.html
<https://object-oriented-python.github.io/edition1/exercises.html>`__
.. [#exercise_page] `https://object-oriented-python.github.io/edition2/exercises.html
<https://object-oriented-python.github.io/edition2/exercises.html>`__
10 changes: 2 additions & 8 deletions doc/source/1_introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ tools. At various points you'll also need install several more Python packages,
but you don't need to install those right now. The core tools you will need
are:

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

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

.. warning::

The example code in the exercises uses :ref:`f-strings <tut-f-strings>`
which were introduced in Python 3.6, so the code will not work in earlier
versions of Python.

.. _create_venv:

Setting up a Python virtual environment
Expand Down
Loading