Errata
The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".
The following errata were submitted by our customers and approved as valid errors by the author or editor.
Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update
Version | Location | Description | Submitted By | Date submitted | Date corrected |
---|---|---|---|---|---|
ePub | Page loc.5900 to of "page", above time example |
"The date module's time object is used to represent a time of day:" but the code uses the datetime module, not the date module. Sentence should refer to datetime? Note from the Author or Editor: |
robert montante | Nov 14, 2014 | Feb 20, 2015 |
ePub | Page loc.4208 section "Structured Text Files", 3rd sentence |
Should the sentence "You might want to save data for our program to use later..." read "You might want to save data for your program to use later..." ? Note from the Author or Editor: |
robert montante | Nov 14, 2014 | Feb 20, 2015 |
ePub | Page Loc 1182 Middle |
letters[-1:0:-1] produces 'zyxwvutsrqponmlkjihgfedcb' Note from the Author or Editor: |
Richard Munde | Mar 07, 2014 | Nov 07, 2014 |
ePub | Page Loc. 502 Top of page |
1.0e8 does not mean "one to the eighth power or 100000000.0" Note from the Author or Editor: |
Richard Munde | Mar 07, 2014 | Nov 07, 2014 |
page 32: fifth and sixth paragraphs |
letters[20:] is 'uvwxyz' not 'vwxyz' Note from the Author or Editor: |
Stephen Neuman | Mar 13, 2014 | Nov 07, 2014 | |
ePub | Page ?? About a quarter of the way down in the Comprehensions section |
In the Comprehensions section, when beginning to introduce the ability to use conditional statements, it asks to find odd numbers between one and five. Instead it finds the numbers that when divided by 3, have a remainder of 1 (1 and 4). While this was confusing at first, it was helpful in understanding what that line of code did better. |
Kyle Williams | Sep 30, 2014 | Feb 20, 2015 |
ePub | Page loc. 885 end of "Get Length wit len()" section |
Last sentence reads "You can use len() with other sequence types, too, as is described see in Chapter 3." Word "see" should be omitted? |
robert montante | Oct 11, 2014 | Nov 07, 2014 |
ePub | Page loc. 1082 3rd paragraph after "Get a slice to Extract Items by Offset Range" |
"The next exampe starts at..." should be "The next example starts at..." |
robert montante | Oct 11, 2014 | Nov 07, 2014 |
ePub | Page loc. 1419 Figure 3-1 |
diagram of union: inner arc shouldn't be there; should be a single unified volume. |
robert montante | Oct 11, 2014 | Nov 07, 2014 |
ePub | Page loc. 1421 sentence before section heding "Crfeate with set()" |
"...an exanple of a null set..." should be "...an example of a null set..." |
robert montante | Oct 11, 2014 | Nov 07, 2014 |
ePub | Page loc. 1568 "Things to do" 3.12 |
Problem 3.12 asks for a dictionary comprehension, but comprehensions aren't discussed until chapter 4. |
robert montante | Oct 12, 2014 | Nov 07, 2014 |
ePub | Page loc. 2274 example code "def document_it(func):" |
In the code for "document_it(func)" , and also in the code for "square_it(func)" later on in the same section, the lines: Note from the Author or Editor: |
robert montante | Oct 18, 2014 | Nov 07, 2014 |
Page 5 4d paragraph |
The follwing code-snippet: Note from the Author or Editor: |
Anonymous | Mar 06, 2014 | Nov 07, 2014 | |
Page 23 United States |
Note from the Author or Editor: |
Mike LeRoy | Dec 04, 2014 | Feb 20, 2015 | |
Page 28 2nd last paragraph |
I found a typo under 'create with quotes' title where author has explained strings using three quotes. Below is the example from book with three single quotes: Note from the Author or Editor: |
Narendra Kangralkar | Feb 10, 2017 | ||
Page 29 United States |
>>> print(poem2) Note from the Author or Editor: |
Mike LeRoy | Dec 04, 2014 | Feb 20, 2015 | |
Printed, PDF | Page 30 In the "Create with Quotes" section |
"two by four" echoes back as "two by four is" Note from the Author or Editor: |
10kLakes | Aug 23, 2016 | |
Page 30 just after subtitle "Combine With +" |
Note from the Author or Editor: |
Donald Altman | Apr 13, 2014 | Nov 07, 2014 | |
Page 32, 33 see below |
letters[::7} is 'ahov' and not 'ahpq' Note from the Author or Editor: |
Anonymous | Mar 13, 2014 | Nov 07, 2014 | |
Page 33 3rd paragraph from end |
Using a plain : is the same as 0:-1 (the entire string): |
Anonymous | Dec 29, 2014 | Feb 20, 2015 | |
Printed | Page 38 bottom |
replace() replaces all instances, if count is missing. |
dan | Dec 20, 2014 | Feb 20, 2015 |
Printed | Page 38 Swap upper- and lowercase: example |
If setup = 'a duck goes into a bar...' (p37), Note from the Author or Editor: |
Joe | Feb 27, 2015 | Feb 26, 2016 |
Page 45 Tip icon text |
Description reverses LIFO and FIFO process. Pop(0) should give FIFO; pop() gives LIFO. Note from the Author or Editor: |
Anonymous | May 21, 2014 | Nov 07, 2014 | |
ePub | Page 45 Get items by offset range with a slice |
The example marxes[::2] is shown to display ['Grouch', 'Harpo'] as the value returned. If the user has been following along withthe examples, ['Groucho', 'Wanda'] will be returned. In a previous example Wanda was substituted for Harpo. Note from the Author or Editor: |
Nick | Sep 19, 2014 | Nov 07, 2014 |
Printed | Page 47 Get a Slice to Extract Items by Offset Range |
in this example: Note from the Author or Editor: |
Anonymous | Oct 03, 2018 | |
ePub | Page 48/49 |
Test for a key with inIf you want to know whether a key exists in a dictionary, use in. Let�s redefine the pythons dict again, omitting a name or two, chen checking to... Note from the Author or Editor: |
Scott Le Camp | Mar 11, 2014 | Nov 07, 2014 |
Page 50 Under "Test for a Value with in" |
In the list named words it seems that a comma is missing between the items 'a' and 'female'. Note from the Author or Editor: |
Iver | Oct 02, 2017 | ||
Page 56 Top: "Are all the characters in the poem either letters or numbers?" |
Starting at the tenth line of text: |
Nick | Sep 15, 2014 | Nov 07, 2014 | |
Printed | Page 65 5th and 6th text paragraphs, as opposed to example code |
The formatting of these two items actually led me astray as I am new to Python. The first states - "proper subset ... Calculate by using <:" Then the example just uses a < . Note from the Author or Editor: |
Al Szymanski | Nov 05, 2015 | Feb 26, 2016 |
Page 87 United States |
>>> def echo(anything): Note from the Author or Editor: |
Mike LeRoy | Dec 05, 2014 | Feb 20, 2015 | |
Page 101 def change_and_print_global() example |
The line: "File "<stdin>", line 2, in change_and_report_it" should read "File "<stdin>", line 2, in change_and_print_global". The function name most likely was changed at some point but the example code was not fully updated. Note from the Author or Editor: |
rifferte | Jun 25, 2015 | Feb 26, 2016 | |
Page 106 Answer tro Things to do 4.9 |
You provide a solution with enumerate() Note from the Author or Editor: |
Anonymous | Dec 30, 2015 | Feb 26, 2016 | |
Page 106 Code block in middle of page |
Line Note from the Author or Editor: |
Ng Hong Liang | May 28, 2019 | ||
Page 111 Second code block |
The lines printed by the program (like "Today's weather: who knows") look like they picked up some unintended syntax highlighting (the apostrophe is treated as a single quote and everything following is in red). Note from the Author or Editor: |
Ben Nathanson | Mar 13, 2015 | Feb 26, 2016 | |
Page 123 2nd paragraph |
"As I mention in Chapter 1, everything in Python...is an object." Should say Chapter 2. Note from the Author or Editor: |
Ben Nathanson | Feb 11, 2015 | Feb 20, 2015 | |
ePub | Page 130 Ch.8, "Write a text file with write", roughly page 130 of ePub. |
"For some reason, there aren't many limericks about general relativity". Note from the Author or Editor: |
Martin Ward | Apr 06, 2014 | Nov 07, 2014 |
Page 131 Table 6-1 |
This table describes python's testing methods. In the table the last two methods appear to be incorrect. In the document: Note from the Author or Editor: |
Jerald Jackson | Apr 01, 2014 | Nov 07, 2014 | |
Page 140 First Paragraph(Code Snippet) |
class Word(): Note from the Author or Editor: |
Anonymous | May 02, 2015 | Feb 26, 2016 | |
Page 140 Second Paragraph |
I suggest author to explain aggregation and compositon in more detail. It was hard to understand, but thanks to Lynda tutorial I understood. Author claims book is suitable for beginners, but I think his OOP explanations are not enough for a beginner. Note from the Author or Editor: |
Anonymous | May 02, 2015 | Feb 26, 2016 | |
Printed | Page 140 Definition of about(self) method of Duck class |
The implementation of about(self) uses the global names 'bill' and 'tail', not instance variables. Note from the Author or Editor: |
Jeff Bienstadt | Aug 05, 2015 | Feb 26, 2016 |
Printed | Page 140 in code example |
The Duck class's about() method refers to "bill.description" and "tail.length". These are the global objects "bill" and "tail", created a little later. To show the values for the "bill" and "tail" attributes of a Duck object, use "self.bill.description" and "self.tail.length". |
Bill Lubanovic |
Jan 18, 2016 | Feb 26, 2016 |
Page 145 Final line of code block in middle of page |
Line Note from the Author or Editor: |
Ng Hong Liang | May 31, 2019 | ||
ePub | Page 150 Things to do 7.14 |
The book says that the pixel width and height of a GIF are encoded as 16-bit big-endian integers, whereas the GIF specification (and indeed the encoded GIF snippet in the book) suggest they are little-endian 16-bit integers. Note from the Author or Editor: |
Stefan Zwanenburg | May 16, 2015 | Feb 26, 2016 |
Page 153 top |
The Pattern Matches table at the top of page 153 shows the following: Note from the Author or Editor: |
Jerald Jackson | Apr 01, 2014 | Nov 07, 2014 | |
ePub | Page 157 try block at end of "Write a Text File with write()" section |
There is an extraneous closing bracket at the end of Note from the Author or Editor: |
Gregory Sherman | Mar 27, 2018 | |
Page 169 2nd Para, 3rd bullet point |
The byte numbers are wrong. I'm finding this a tricky topic so it's good to get the numbering right for it to make sense. Each dimension (width and height) is represented by four bytes, so the byte sequences should be numbered 16-19 inclusive and 20-23 inclusive. not 16-20 and 21-24. Note from the Author or Editor: |
m!lh0use | May 19, 2019 | ||
Page 170 United States |
Question 7.3 decode pop1 should be pop_bytes Note from the Author or Editor: |
Mike LeRoy | Dec 12, 2014 | Feb 20, 2015 | |
Page 171 Exercise 7.14 |
The exercise 7.14 begins with: "The pixel width of a GIF is a 16-bit big-endian integer". It's wrong, the byte order is little-endian, as can be seen here http://www.onicos.com/staff/iz/formats/gif.html. Note from the Author or Editor: |
Lorenzo Gasparini | Jun 19, 2015 | Feb 26, 2016 | |
Printed | Page 175 Last line on page |
Extraneous ']' (closing square bracket) on call to open() Note from the Author or Editor: |
Jeff Bienstadt | Aug 10, 2015 | Feb 26, 2016 |
ePub | Page 194 code |
. Note from the Author or Editor: |
Gregory Sherman | Mar 30, 2018 | |
Printed | Page 197 middle paragraph, second line of text |
"...those three values as a list..." Note from the Author or Editor: |
Jeff Bienstadt | Aug 11, 2015 | Feb 26, 2016 |
Other Digital Version | 201 of 21403 bottom of that location |
The author is telling on this page about "special words" and on the same page an example-output it wrongly formatted, thereby confusing the reader. Because it would make Python a very very bad tool, if normal strings would behave funny whenever they contained any of the "special words". So this formatting error in the worst possible location. Note from the Author or Editor: |
Martin Zaske | Aug 12, 2015 | Feb 26, 2016 |
ePub | Page 207 after "add two new directive lines" |
An extraneous dollar sign and space are in the first directive to be added: Note from the Author or Editor: |
Gregory Sherman | Mar 30, 2018 | |
Printed | Page 220 final interpretor code |
url 'http://www.iheartquotes.com/api/v1/random' does not work anymore. Note from the Author or Editor: |
Greg Kedrovsky | Dec 22, 2015 | Feb 26, 2016 |
ePub | Page 222 Roughly 1 page after section title "RPCs"; then end of OpenStack section. |
Section on RPCs, ePub page 222. Note from the Author or Editor: |
Martin Ward | Apr 06, 2014 | Nov 07, 2014 |
Printed | Page 227 top code snippet |
The code example on pages 227 - 230 are unfortunately no longer reproducible, because omdbapi.com now requires a paid API key. Note from the Author or Editor: |
Niels van den Oever | Sep 27, 2017 | |
ePub | Page 227 date object |
>>> from datetime import date Note from the Author or Editor: |
Gregory Sherman | Mar 30, 2018 | |
Printed | Page 229 second code block |
in the echo function we are returning 'thing' but which will print just the text we use in the url. Further down the page the statement is made that we should see the full 'Say hello to my little friend: ' string but we don't because it is not included in the echo function. Note from the Author or Editor: |
Micheal Beatty | Dec 27, 2014 | Feb 20, 2015 |
Page 232 United States |
from flask import Flask, render_template Note from the Author or Editor: |
Mike LeRoy | Jan 05, 2015 | Feb 20, 2015 | |
Printed | Page 244 JSON section |
The section states "Chapter 1 shows two Python code samples to get information on popular YouTube videos ..." Note from the Author or Editor: |
Joshua Granger | Dec 18, 2017 | |
Page 265 Second code example, showing a queue |
In def dryer(dish_queue) function, `while True` is indented 2 times. It should be indented only once. So as it is now, it should be moved four spaces to the left. Note from the Author or Editor: |
Anton Antonov | Nov 28, 2014 | Feb 20, 2015 | |
Printed | Page 266 code at the top of the page |
dryer_thread.start() is indented 8 spaces, but should only be indented 4. Note from the Author or Editor: |
Anonymous | Dec 15, 2015 | Feb 26, 2016 |
Printed | Page 272 code in the middle of the page |
In the code for redis_washer.py, num is not defined. I think what you had in mind was dish rather than num. Note from the Author or Editor: |
Anonymous | Dec 15, 2015 | Feb 26, 2016 |
Printed | Page 278 First sentence of ZeroMQ section |
The first sentence of the ZeroMQ section asks, "Remember those ZeroMQ PUB and SUB sockets a few pages ago?" However, these did not occur before this page. There is a prior mention of ZeroMQ on page 276, in the first paragraph, where it states that we have already touched on it, but I am fairly certain we did not. The index entry for ZeroMQ puts its first mention on page 278. Note from the Author or Editor: |
Anonymous | Dec 17, 2015 | Feb 26, 2016 |
Page 315 in just_do_it def |
missing "#" in front of Capitalize Note from the Author or Editor: |
Mike LeRoy | Jan 29, 2015 | Feb 20, 2015 | |
ePub | Page 324 Make an Array with array() |
You can make an array from a normal list or tuple: Note from the Author or Editor: |
Gregory Sherman | Apr 03, 2018 | |
Printed | Page 330 just over halfway down the page |
Sentence reads: Note from the Author or Editor: |
Anonymous | Dec 24, 2015 | Feb 26, 2016 |
Printed | Page 392 2nd paragraph from bottom |
The link given to install Anaconda 2, http://repo.continuum.io/anaconda3 did not work for me. A quick Google search lead me to http://continuum.io/downloads to get Anaconda. Note from the Author or Editor: |
Robert St. Pierre | Apr 20, 2015 | Feb 26, 2016 |
Printed | Page 412 Question 7.11 answer |
Hello, Note from the Author or Editor: |
Anthony Hocquet | Nov 24, 2015 | Feb 26, 2016 |
Printed | Page 413 second line of first group interpretor code under 7.8 |
The line of code just under "import re" reads "re = r'\bc\w*'" and it should (I believe) read "pat = r'\bc\w*'". The "re" appears to be a type and should be the variable "pat" for the regex pattern. Note from the Author or Editor: |
Greg Kedrovsky | Dec 22, 2015 | Feb 26, 2016 |