Introducing Python

Errata for Introducing Python

Submit your own errata for this product.


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 1182
Middle

letters[-1:0:-1] produces 'zyxwvutsrqponmlkjihgfedcb' not 'zyxwvutsrqponmlkjihgfedcba' To produce the latter string: letters[-1::-1]

Note from the Author or Editor:
Fixed this one and others in the slice section.

Richard Munde  Mar 07, 2014 
ePub
Page Loc. 502
Top of page

1.0e8 does not mean "one to the eighth power or 100000000.0" since 1 to the eighth power is one. Rather it mean 1 times 10 to the eighth power which indeed is 100000000.0.

Note from the Author or Editor:
Corrected. Thanks!

Richard Munde  Mar 07, 2014 
PDF
page 32: fifth and sixth paragraphs

letters[20:] is 'uvwxyz' not 'vwxyz' letters[12:15] is 'mno' not 'nop'

Note from the Author or Editor:
Fixed in Atlas.

Stephen Neuman  Mar 13, 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 
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 
ePub
Page loc. 1419
Figure 3-1

diagram of union: inner arc shouldn't be there; should be a single unified volume. diagram of intersection: the intersection should be shaded

robert montante  Oct 11, 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 
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..." Also, why is "slice" not capitalized in the section heading?

robert montante  Oct 11, 2014 
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 
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: def new_function(*args, kwargs): result = func(*args, kwargs) should have double asterisks in front of "kwargs", like this: def new_function(*args, **kwargs): result = func(*args, **kwargs)

Note from the Author or Editor:
Fixed in QC2. We lost those asterisks in formatting somewhere. Thanks! I would have hated to see that in print.

robert montante  Oct 18, 2014 
PDF
Page 5
4d paragraph

The follwing code-snippet: import requests url = "https://gdata.youtube.com/feeds/api/standardfeeds/top_rated?alt=json" response = requests.get(url) data = response.json for video in data['feed']['entry'][0:6]: print(video['title']['$t']) Returns: Traceback (most recent call last): File "ex2.py", line 5, in <module> for video in data['feed']['entry'][0:6]: TypeError: 'method' object is not subscriptable I used python3.2 on Debian 7.4 to run the code which I previously saved in ex2.py, The module requests was installed.

Note from the Author or Editor:
Fixed. Lost the () in cut & paste.

Anonymous  Mar 06, 2014 
PDF
Page 30
just after subtitle "Combine With +"

page 30 (Chapter 2 "Combine with +") the first line reads: a = ' it should read: a = '' otherwise the interactive interpreter will return an error after the line. This actually is minor typo except that it would return the error. Good luck. Introducing Python early release revision 2 ISBN: 978-1-449-35936-2

Note from the Author or Editor:
Fixed at some point.

Donald Altman  Apr 13, 2014 
PDF
Page 32, 33
see below

letters[::7} is 'ahov' and not 'ahpq' letters[4:20:3] is 'ehknqt' and not 'ehloru' letters[19:4] is 'tx' and not 'uy' letters[:21:5] is 'afkpu' and not 'aflqv'

Note from the Author or Editor:
Those have been fixed in Atlas. I don't know when an update will be made available.

Anonymous  Mar 13, 2014 
PDF
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:
Fixed in ms. Thanks!

Anonymous  May 21, 2014 
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... Chen instead of then

Note from the Author or Editor:
Fixed. Thanks!

Scott Le Camp  Mar 11, 2014 
PDF
Page 56
Top: "Are all the characters in the poem either letters or numbers?"

Starting at the tenth line of text: Are all the characters in the poem either letters or numbers? >>> poem.isalnum False Nope, there were some punctuation characters. Should read >>> poem.isalnum() Parenthesis missing in the book.

Nick  Sep 15, 2014 
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". There are none, as far as I know. This limerick refers to SPECIAL relativity. An esoteric point, I know, but, as a physicist, I couldn't let this one pass. And if you ever do find a limerick about general relativity, I'd love to hear it.

Note from the Author or Editor:
That is the best erratum I've ever seen. Thanks! Maybe I can find something about inflation or entanglement?

Martin Ward  Apr 06, 2014 
PDF
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: __lt__(self, other) self <=other __le__(self, other) self >=other It should read: __le__(self, other) self <=other __ge__(self, other) self >=other

Note from the Author or Editor:
Thanks for catching this.

Jerald Jackson  Apr 01, 2014 
PDF
Page 153
top

The Pattern Matches table at the top of page 153 shows the following: prev+? one or more prev, as few as possible prev+? one or more prev, as many as possible The table actually starts on the previous page (152) where both of the above possibilities are noted. Not to mention that the second is incorrect, I believe. It should read "prev+ one or more prev, as many as possible".

Note from the Author or Editor:
You're right, I had duplicated those two lines. Thanks.

Jerald Jackson  Apr 01, 2014 
PDF
Page 153
end of page

The second example from the bottom of the page reads: Find fish tonight. at the end: >>> re.findall('fish tonight.$', source) I could be mistaken as I am just learning python, but I think that perhaps should read: >>> re.findall('fish tonight\.$', source) Since the '.' would be interpreted as a regex character and not as a literal period.

Note from the Author or Editor:
Both work: >>> re.findall('fish tonight.$', source) ['fish tonight.'] The dot is interpreted as any character (including a period). For a literal period, I should say this: >>> re.findall('fish tonight\.$', source) ['fish tonight.']

Jerald Jackson  Apr 01, 2014 
ePub
Page 222
Roughly 1 page after section title "RPCs"; then end of OpenStack section.

Section on RPCs, ePub page 222. "The function we'll providing on the server..." should be "The function we'll be providing on the server..." Just after OpenStack section, page 229. "Things to to" should be "Things to do".

Note from the Author or Editor:
Fixed both of them. Thanks.

Martin Ward  Apr 06, 2014