luke.bace (66) [Avatar] Offline
Please post errata here.
JuanDG (7) [Avatar] Offline
Minor Correction
On Page 39 of the new MEAP version (01/06/2011), there's a note named "list gotchas" and it reads:

"One difference between Python and some other programs such as C [...] "

C is a programming language and it is misleading to call it a "program", especially when the intended audience of this book is beginner computer programmers. The phrase also implies that Python is also a "program".

It is a minor issue, but I think it will help a lot on this paragraph's clarity especially since it discusses programming language features such as the way variables are handled by each of these programming languages.
fishburn (5) [Avatar] Offline
Re: Errors and Corrections
(PDF last saved on 2011.01.04) Page 39, top half of the page,
wumpus_r_us_list = ['Bow and Arrow', 'Lantern', 'Rope']

Issue #1
I'm not sure if the variable names are misnamed, or if the indexes are off, or if the variable names aren't meant to reflect the results of the variables:

first_three = wumpus_r_us_list[0:2]
- The name implies 3 items, but [0:2] only returns 2

last_three = wumpus_r_us_list[-2:-1]
- The name implies 3 items again, but only returns 1 ['Lantern']

Issue #2
first_three = wumpus_r_us_list[0:2] does return the same slice as
first_three = wumpus_r_us_list[:2]

last_three = wumpus_r_us_list[-2:-1] does not return the same slice as
last_three = wumpus_r_us_list[-2:].

Issue #3 (sort of)
I wasn't sure if you wanted to mention it in passing, but when discussing lists and slices, I didn't see a mention of copying a list using [:] (e.g. b = a[:]) or list() (e.g. b = list(a)).

run on python v2.6.1 @ OS X; v2.7 on Windows
fishburn (5) [Avatar] Offline
Re: Errors and Corrections
Page 45, #5 Mark the cave as visited:
"unvisited caves == []" is missing the underscore in the variable name

Page 47, last line of Listing 2.9 text:
"add_one_to_a" is the wrong function name: it should be "add_to_a"

Page 48, end of 2nd paragraph in Listing 2.11 text:
"We'll learn more about how that works in chapter X"... it's probably not really "X" at this point, is it?

Page 49, 2.8 Fixing the wumpus:
Bulleted list is prefaced by, "into functions where they:" and the third item is "if the statements..." So when read, it could sound like "into functions where they if the statements..." The last sentence and bullet list maybe should be changed to something like:
In principle, it's not too hard. Just look for parts of your program that fit some of the following criteria:
* they do one particular thing (self-contained)
* they are repeated several times
* the statements of a section are hard to understand
then try to pull them out into functions.
JuanDG (7) [Avatar] Offline
Re: Errors and Corrections
I believe indentation should be thoroughly discussed on Chapter 2. It’s only mentioned in passing and being a key element on Python I think Chapter 2 is a great place to include this topic.

Does any one else agrees? (or disagrees?)
JuanDG (7) [Avatar] Offline
Re: Errors and Corrections
A few more "Errors and Corrections" I've found so far:

On line 3 of Page 55 the font type on the word “That's” is incorrect.

On Page 59 right on the last line there’s this sentence: “then turn it into a fully fledged game with a which can be played and won (or lost).” I believe it should be this instead: “then turn it into a fully fledged game which can be played and won (or lost).”

On Page 61 I think including the Time machine joke is great, as it is often referenced on forums and mailing lists, but there’s not no context whatsoever on who Guido is! A short note there or earlier in the book, on who he is would be very helpful for beginners.

On Page 63 on the “include just the module” section, the author mentions how Python makes available an OS object when you import the OS module. This is technically incorrect as it is NOT an object it is a namespace. See Chapter 10 of Manning’s “The Quick Python Book, Second Edition” for more details.

The bubble on Page 63 is out of context, the paragraph it refers to is in the next page. I believe the bubble should be moved to page 64 to give it a better context.

On Page 72 Code Listing 3.8 “Running our hash generating program” on the last line, the word “python” is missing after the OS prompt. This actually calls the Python interpreter and If it’s not included the listing won’t work.

On Page 75, line 6 the text says “One solution to this is to delete the files from the directory”. This is clearly wrong. What needs to be done is delete them from the Dictionary, and this is exactly what the author does in Code Listing 3.11 section #4 deletes them from the dictionary, not the directory.

On Page 112, Section 4.7.3 “Editing todos” it reads: “Since editing is a cross between deletion and editing in many ways, […]” This is clearly wrong, it should be a “Since editing is a cross between deletion and creation in many ways,[…]” as this is exactly what the author sets to do in the following section.
JuanDG (7) [Avatar] Offline
Re: Errors and Corrections
I've run through multiple instance of the "Chapter X", "Chapter XX", "Chapter XXX" do you want us to report these as well, or are you already planning to deal with those on the next version?
dsparling (20) [Avatar] Offline
Re: Errors and Corrections
Caveat - I'm not a copy editor, just going with my basic knowledge of English grammar. Unfortunately, I'm cursed with noticing these things smilie

1/4/11 Version - Chapter 1

Page 9. "it's" should be "its"

"Python even has it's own philosophy..."

should be

"Python even has its own philosophy..."

Page 9. commas generally go inside quotes (in American English anyway), but there are exceptions I think, but I couldn't tell you what they are.

"Python's developers try to do things 'right', by making programming,,,"
"Python's developers try to do things 'right,' by making programming..."

Page 10. "Good artists borrow, Great artists steal."
"G" in "Great" should probably be lowercase.
"Good artists borrow, great artists steal."

Page 17. Periods also generally go inside quotes, but once again, a real editor would know better than I do.
To start, right click on your 'My Computer' icon and click 'Properties'.
To start, right click on your 'My Computer' icon and click 'Properties.'

Page 16. - exempli gratia - use "e.g.," instead of "eg."

(eg. on one of the Python mailing lists)
should be
(e.g., on one of the Python mailing lists)
D023604 (2) [Avatar] Offline
Chap 7 Iterators 7.1.1
The last sentence of the first paragraph is missing a word and is

The text is presently "You don't need to know how iterators work, in order to make use of them, but they're useful for understanding generators operate."

It should possibly read "You don't need to know how iterators work, in order to make use of them, but it (a knowledge of how iterators work) is useful for understanding how generators operate.
scientifics (2) [Avatar] Offline
Re: Errors and Corrections
Page 32

Codify ("I smell a wumpus!")

Page 33

Codify player_location == wumpus_location - 1

Page 37

You switch from using:
from random import choice

import random

but you don't switch the syntax from:


This causes the program to fail (until 2.10)

Page 41-42, 48-49, 49-50, 50-51
New page makes indenting in code inconsistent with previous page.
teleute (2) [Avatar] Offline
Re: Errors and Corrections
On page 33 in Table 2.3 the section for Comments appears to be cropped.

Whenever Python encounters a # character that's at the start of a line, it'll
ignore that line and not run it. As well, if there's a # character that's not inside
a string, it will ignore the rest of the line. Comments are used to explain parts
of your program, either to other programmers, or to yourself in a few weeks,
when you've forgotten most of the details of what you were doing. You won't
see too many in the book, since we can use