By Developers, For Developers

Historical errata for Practical Programming, Third Edition

PDF PgPaper PgTypeDescriptionFixed onComments
211ERROR

Python has a type called set that allows us to store mutable collections of
unordered, distinct items. (Remember that a mutable object is one that you
can modify.)

Sets are immutable meaning they cant be changed. this looks like a copy paste error from the python list() text.

0TYPO

In the exercise answers, the title of chapter 11 is not reading and writing files. That is chapter 10.

254ERROR

binary_search() code is incorrect. It fails when the middle value is the searched value. I confirmed by copy-pasting the code and running it; some doctests fail.

275ERROR

Page numbering jumps from page #273 to #275. (So from there onwards odd- and even-numbered pages have changed places.)

299ERROR

The value ‘country’ of country.Country(‘Canada’, 34482779, 9984670) does not exist in the example interaction of exercise 2 and causes a syntax error. Removing ‘country.’ fixes the issue.

Here is a sample interaction from the Python shell:
>>> canada = country.Country(‘Canada’, 34482779, 9984670)
>>> usa = country.Country(‘United States of America’, 313914040, 9826675)

212TYPO

I think the memory model at the bottom of page 212 contains a typo error. It is drawn as variable “canada” contains id3, which still contains id1 and id2. I believe id3 should contain to id1 and id13 instead.

Categories: