Errata
The errata list is a list of errors and their corrections that were found after the product was released.
The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.
Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update
Version | Location | Description | Submitted by | Date submitted |
---|---|---|---|---|
n/a Chapter 10. Oh Oh: Objects and Classes, Section Class and Object Attributes |
IMO this paragraph is a bit confusing. |
Anonymous | Aug 08, 2021 | |
Printed | Page pg.450, chap.19 Books second bullet point |
Beazley, David M. Python Essential Reference (5th edition) Addison-Wesley, 2019 is not a released title, |
Anonymous | Nov 13, 2023 |
ePub | Page Page 449 Example 15-8. cf2.py |
I am new with Python. Going throught the book and so far I was able to understand all the sample code. Sometime I had to ajust and it was fine. In the main function of cf2.py example there are 2 for loops that begin as follow: |
Richard Desrosiers | Nov 29, 2023 |
O'Reilly learning platform | Page https://learning.oreilly.com/library/view/introducing-python-2nd/9781492051374/ch03.html#idm45795039 4th paragraph in the section "How Big Is an int?" |
This paragraph states that "A googolplex is 10**googol (a thousand zeroes, if you want to try it yourself)." The user pointed out that a googolplex is 1 followed by a google of zeroes, not one thousand. |
Anonymous | Aug 06, 2024 |
Printed | Page 9 bottom three lines on p. 9 |
In item 14 at the bottom of the page, it says, "Notice that this line and the next two are indented." It should say, "Notice that this line and the next three are indented." (The next three lines are lines 15, 16, 17, which are all indented.) |
Mark Daniel Ward | Jun 17, 2020 |
Printed | Page 13 lines 20-21 |
in the phrase ... "are successors to C and C++ that avoid" ... we have a line break in the middle of the name of the language C++. We have C at the end of line 20, and ++ at the start of line 21. This looks very strange, to allow a line break in the middle of the name C++. |
Mark Daniel Ward | Aug 01, 2020 |
Printed | Page 17 7 lines from the bottom |
In the phrase "it will be around for while" |
Mark Daniel Ward | Oct 02, 2020 |
Page 25 Last paragraph |
You state that "Python is strongly typed, which means that the type of an object does not change, even if its value is mutable". |
Eugene | Jul 26, 2021 | |
Printed | Page 29 and 32 page 29, end of the section, and page 32, near the top of the page |
On page 28, we have |
Mark Daniel Ward | Oct 05, 2020 |
Page 45 Get a Slice to Extract Items by Offset Range |
wrong >>> marxes = ['Groucho', 'Chico,' 'Harpo'] |
Konstantin Klenkov | May 06, 2021 | |
Printed | Page 49 3rd paragraph |
The book says: |
Mark Daniel Ward | Oct 10, 2020 |
Printed | Page 54 example at the bottom of page 54 |
"add the first five digits" |
Mark Daniel Ward | Oct 17, 2020 |
ePub | Page 56 2nd |
“Python is calculating the subtraction on the righthand side, remembering the result, and then assigning it to a on the left side of the + sign. It’s faster and neater than using a temporary variable.” |
Daniel | Dec 07, 2021 |
Printed | Page 66-67 The tab example at the bottom of page 66 and top of page 67 |
The spacing on the tabs in this example is not consistent. It should look like this: |
Mark Daniel Ward | Oct 23, 2020 |
Printed | Page 72 line 7 |
Line 8 says letters[-51:-50] |
Mark Daniel Ward | Oct 24, 2020 |
Printed | Page 76 in the duck example |
In the duck example (i.e., when word = "duck") |
Mark Daniel Ward | Oct 27, 2020 |
Other Digital Version | 78 Walrus operator section |
incorrect: if diff := tweet_limit - len( tweet_string) > = 0: |
Anonymous | Sep 10, 2021 |
Printed | Page 85 question 5.5 |
In question 5.5, where we "assign values to variable strings" the variable 'amount' is missing from the list, even though 'amount' is one of the variables in the form letter. |
Mark Daniel Ward | Oct 28, 2020 |
Printed | Page 91 First sentence after Generate Number Sequences with range() |
The first sentences of the Generate Number Sequences with Range have an errand period where there should be a comma. To wit: |
Lee Creighton | May 20, 2020 |
Printed | Page 91 Last paragraph starting with "Like zip()..." |
Although the paragraph says "Like zip(), range() returns an iterable..." it turns out that zip() isn't introduced until p. 110. This is almost certainly a holdover from the first edition when this paragraph immediately followed a section on zip. Said paragraph now shows up on p. 110, much later than the p. 91 where zip() is brought up as an example. |
Lee Creighton | May 20, 2020 |
Printed | Page 91 the section called Generate Number Sequences with range() |
On page 91, in the section called Generate Number Sequences with range(), there are two typo's: |
Mark Daniel Ward | Nov 04, 2020 |
Printed | Page 92 question 6.3 |
In question 6.3, on line 3, please change: |
Mark Daniel Ward | Nov 04, 2020 |
Printed | Page 92 question 6.2 |
In line 3 of question 6.2, in the phrase |
Mark Daniel Ward | Nov 04, 2020 |
Printed | Page 94 After "You could enclose them in parentheses..." |
Center pf page, you have |
Lee Creighton | May 20, 2020 |
Printed | Page 95 3rd code example |
password and icecream are strings. They each need a trailing comma to be tuples. |
Anonymous | Jul 07, 2020 |
Page 96 Example code under "Modify a Tuple" |
Line 2 of the 1st example contains "t2 = ('Flop,')". The PyCharm IDE treates this as a string, not a tuple. The next line of code "t1 + t2" attempts to concatenate a tuple and string producing an error "TypeError: can only concatenate tuple (not "str") to tuple". |
john chapman | Nov 26, 2021 | |
Printed | Page 97 Examples under Create with [] |
Under Create with [] there are several examples, including the first one which says |
Lee Creighton | May 20, 2020 |
Printed | Page 108 1st paragraph of "Copy Everything with deepcopy()" section, 2nd sentence |
The specified sentence on p. 108 includes "tuple" as an example of a mutable value. This directly contradicts p. 93, paragraph 4 which states that "Tuples are immutable". |
Nathan Dias | Dec 20, 2020 |
Printed | Page 111 examples following the paragraph that starts "Chapter 8 shows you..." |
You give an example of changing the days of the week from English to French. |
Lee Creighton | May 20, 2020 |
Printed | Page 119 Paragraph above "Add or Change an Item by [key] |
Read the sentence above "Add or Change an Item by [key]: |
Lee Creighton | May 20, 2020 |
Printed | Page 119 Problem 8.12 |
You ask the reader to use a generator comprehension to return a string (etc.) but generator comprehension are no longer in this chapter since the revision. They don't appear until the next chapter on p. 158, so perhaps this exercise should be moved or deleted. |
Lee Creighton | May 20, 2020 |
Printed | Page 128 1st section |
Iterating through a dictionaries keys, the code is: |
Paul Marshall | Dec 29, 2022 |
ePub | Page 142 "Compare Tuples" section |
The brief explanation under "Compare Tuples" says that "This works much like list comparisons". But lists haven't even been introduced yet at this point. |
Anonymous | Oct 10, 2020 |
Printed | Page 143 code block below center that starts with def commentary(color): |
For some reason, single and double quotes are mixed in this code block It's unnecessary and probably not pythonic to do it that way, so you may want to be consistent with one quote style (Single quotes is my guess) in the next printing. |
Lee Creighton | May 20, 2020 |
Printed | Page 163 opening para, "Uses of _ and __ in Names" |
Missing description and example of single-underscore role. |
P Tufts | Aug 15, 2020 |
ePub | Page 164 3rd to last REPL block of f-strings section |
>>> f'{thing =}, {place =}' |
Gregory Sherman | Jul 17, 2020 |
ePub | Page 164 2nd to last REPL block of f-strings section |
See error report of "3rd to last" - same problem with output having extra spaces |
Gregory Sherman | Jul 17, 2020 |
ePub | Page 164 3rd & 2nd to last REPL blocks of f-strings section |
In addition to the issue with spaces, the entire output strings will be surrounded by double quotes. |
Gregory Sherman | Jul 17, 2020 |
ePub | Page 165 last REPL block of f-strings section |
>>> f'{thing = : >4.4}' |
Gregory Sherman | Jul 17, 2020 |
Printed | Page 202,203 last paragraph on p.202 and several places on p.203 |
On last paragraph of p.202, the subdirectory should be named sources instead of choice to be consistent with the line "from sources import fast, advice" in Example 11-7 on page 203. Changes should also be made on page 203 on the references to the locations of fast.py and advice.py |
Jeng-nan Shiau | Jun 23, 2020 |
Printed | Page 205 last code example in "Relative and Absolute Imports" section |
Original text: |
Ruey-Cherng Yu | May 15, 2022 |
Page 241 code around the middle |
>>> data[20:24]0x9a |
Yuri | Mar 22, 2024 | |
Page 248 2nd paragraph |
The book says "Python’s standard library has many date and time modules, including: datetime, |
Adam Dingle | Dec 15, 2023 | |
Page 266 Table 13-2 |
"a" should be "%a" for the weekday abbrev row |
O'Reilly Media |
Jul 28, 2020 | |
ePub | Page 268 Beginning of the section "Duck typing" |
The sentence "Let’s use the same __init__() initializer for all three Quote classes now, but add two new functions" appears to assume that these three classes have already been introduced and discussed. But that is not the case. |
Anonymous | Nov 19, 2020 |
Printed | Page 280 the paragraph below the mp.py output |
The paragraph reads: |
bruno carballo zama | Aug 28, 2020 |
Printed | Page 306 2nd paragraph |
Example 16-1 |
Glenn Travis | Oct 13, 2021 |
Printed | Page 306 2nd paragraph |
I initially posted as unconfirmed. However I went back and based on what I was suspicious of, changed the line of code from : |
Glenn Travis | Oct 13, 2021 |
Printed | Page 331 First paragraph starting with "The following is..." |
"`'w'` to write" should be "`'w'` to read and write for existing database" in the second line. |
Yuri | Sep 28, 2020 |
Printed | Page 404 Line 22 of listing 18-14 |
This isn't as much an error in the code of listing 18-14 (iamovies.py) as a tip for getting it to work. When I tried to run it I got KeyErrors every time. After some debugging it turns out that the errors were due to missing descriptions in many of the entries in the archive (there is always a title and always an identifier). The best way to handle this, I found, was to replace 'doc["description"]' in line 22 with doc.get("description"), which returns None if there is no such key instead of a KeyError. Once I made this change the script worked as advertised. |
Bruce Altner | Oct 30, 2021 |
ePub | Page 494, 495 2nd paragraph of "concurrent.futures" text, __main__ |
"The program takes an optional command_line argument of the number of workers to use, which defaults to 3." |
Gregory Sherman | Oct 05, 2022 |
Printed | Page 536 Last paragraph (in solution for 6.2) |
Replace the "start" in last 2 lines with "number" |
Sanjay S | Apr 26, 2020 |
Printed | Page 552 Top of the page |
In Appendix D: Answers to Exercises |
Gio J | Sep 12, 2022 |
Printed | Page 578 punctuation attribute |
In the punctuation entry of the string module attributes, it should read: |
Mark Daniel Ward | Oct 26, 2020 |
ePub | Page 612 json_rpcclient.py |
When run under Python 3.10.0 on a Windows 10 PC with newly installed jsonrpcclient-4.0.2, it fails with: |
Gregory Sherman | Oct 08, 2022 |
ePub | Page 817 "So far ..." text and example below |
"So far, our examples have used integers, but floats work just fine: |
Gregory Sherman | Oct 17, 2022 |