Skip to content

Commit 5ec4d80

Browse files
committed
chapter 2 and 3 fixes
1 parent 7643da6 commit 5ec4d80

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

doc/source/2_programs_in_files.rst

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,9 @@ IPython can now be run by simply typing:
7878
This will result in output similar to the following:
7979

8080
.. code-block:: ipython3
81-
82-
Python 3.9.4 (default, Apr 5 2021, 01:50:46)
81+
Python 3.11.0 (main, Oct 25 2022, 14:13:24) [Clang 14.0.0 (clang-1400.0.29.202)]
8382
Type 'copyright', 'credits' or 'license' for more information
84-
IPython 7.19.0 -- An enhanced Interactive Python. Type '?' for help.
83+
IPython 8.6.0 -- An enhanced Interactive Python. Type '?' for help.
8584
8685
In [1]:
8786
@@ -295,15 +294,15 @@ containing complex maths functions called
295294
:mod:`python:cmath`. Clearly, it's important that we can distinguish
296295
between :func:`python:math.sin` and :func:`python:cmath.sin`. Here the
297296
module names :mod:`math` and :mod:`cmath` form the namespaces that
298-
differentiate between the two :func:`sin` functions. There are
299-
essentially only two core namespace concepts. One of them is that
300-
every name is in a namespace, and any given time points to a unique
301-
value. The second one is that namespaces can be nested, so a name in a
302-
namespace can itself be another namespace. For example, the math
303-
namespace contains the value :obj:`math.pi`, which itself defines a
304-
namespace for some operations that are built into Python numbers. The
305-
(somewhat uninteresting) imaginary part of π can be accessed as
306-
:obj:`math.pi.imag`.
297+
differentiate between the two :func:`sin` functions.
298+
299+
There are essentially only two core namespace concepts. One of them is that
300+
every name is in a namespace, and any given time points to a unique value. The
301+
second one is that namespaces can be nested, so a name in a namespace can
302+
itself be another namespace. For example, the math namespace contains the value
303+
:obj:`math.pi`, which itself defines a namespace for some operations that are
304+
built into Python numbers. The (somewhat uninteresting) imaginary part of π can
305+
be accessed as :obj:`math.pi.imag`.
307306

308307
Namespaces are a simple but fundamental concept in programming. To
309308
quote one of the key developers of the Python language:
@@ -1022,7 +1021,7 @@ already familiar with Git and GitHub then you will also need to work through
10221021

10231022
Using the information on the `book website
10241023
<https://object-oriented-python.github.io/edition1/exercises.html>`__
1025-
create your first exercise repository for this module and clone it
1024+
create your chapter 2 exercise repository for this module and clone it
10261025
into your working folder. The exercise repository just contains a
10271026
:file:`README` and some tests. Your job in the following exercises will be
10281027
to populate it with the remaining content.

doc/source/3_objects.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ Let's try our new addition functionality in action:
691691
In [4]: b = Polynomial((0, 1))
692692
693693
In [5]: print(b)
694-
x + 1
694+
x
695695
696696
In [6]: print(a + b)
697697
x^3 + 3x + 1

doc/webgit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit cfda2558a0fe948466da7b5a0ffabb739de2999e
1+
Subproject commit f73a6456b63143502cb86bbd7eeef38e676f9f00

0 commit comments

Comments
 (0)