[Core Python Applications Programming] [Core Python Applications Programming]

Errata/Corrigenda

Mar 2012 NOTE: The book went to press without some key corrections I came up with after the "go-to-press" deadline, so they're listed here for those of you "early adopters." Be aware that errata items are proactively corrected in electronic (Safari, Kindle, iTunes, etc.) versions as well as future hardcopy printings of this book.


If you find a new problem, send it to us at corepython (at) yahoo.com. Each errata item follows the format below... submit yours using the same format so that we can upload it faster to this page. We are also interested in hearing comments, suggestions, and general feedback, both good and bad. We want to continue improving the book for future readers and editions! MANY THANKS!!

Page(s) :: Section (may also have Figure, Table, or Example number) :: Subsection (if appl.) : correction

Also, to keep things under reader control, there are a pair of errata categories, "minor" and... well, not minor. Minor erratum includes wrong typefaces or typos and do not affect the code or the material. Everything else does. Sadly, I can sometimes spot two spaces between words, so in order to not distract readers with this fluff, there's a switch below to hide such minor errata. There are also controls for each printing, so if you have future printings where errata are fixed, you don't need to see those items now, do you?


Chapter 1

38 :: 1.4 : Example 1-2 : Line 8 : It should be eachLine.rstrip() (source correct online)

38 :: 1.4 : In the final para on page, need to bold+mono/Courier "with"; similar for "from __future__"

39 :: 1.4 : Example 1-3 : Line 9 : It should be eachLine.rstrip() (source correct online)

41-42 :: 1.4 : Example 1-5 : Lines 11-12 : For those of you with 64-bit versions of Python, you may see the following error:
$ python gendata.py  
Traceback (most recent call last):
  File "gendata.py", line 12, in 
    dtstr = ctime(dtint)        # date string
ValueError: unconvertible time
This is because time.ctime() cannot process such large values. The fastest way to get your code working is to replace the use of sys.maxint on line 11 with something "reasonable" like 2 ** 32, as in: dtint = randrange(2**32). You can even remove the now-superfluous import. We've created a special version of this example called gendata-64b.py and made it available on the Web site.

43 :: 1.5 : Line-by-Line Explanation : change subsection titles

Chapter 2

59 :: 2.3.1 : in the final para of subsection, add a missing comma by changing {6} to {,6}

79 :: 2.5 : Table 2-3 : in the row for BaseRequestHandler, change "instances" to "subclasses"

Chapter 3

101 :: 3.x : Example 3-1 : line 44 is unnecessary and can be deleted; this change has already been made to the downloadable version from this site

131 :: 3.4.16 : really should change this to section 3.5 and cascade this change downwards

133 :: 3.4.16 : Lines 30-33 : remove the hyphen from s.set_debug-level

134 :: 3.4.16 : Lines 35-48 : Underline the entire final sentence here as some readers will complain the code does not work: "Naturally, you need to fill in all of the following for your application to work: SENDER, RECIPS, and SOME_IMG_FILE."

136 :: 3.4.16 : Best Practices : change "...these two e-mail services, let's..." to, "...the two e-mail services from Google and Yahoo!, let's..."

143 :: 3.4.16 : Lines 72-84 : socket.error should not be bold

154 :: 3.6 : Exercise 3-30 : remove the first hyphen in e-mail-examples.py

Chapter 4

156 :: opening quote : need a space between ">" and the first word of each line that has them, i.e., "> With..." and "> Sorry...".

169 :: 4.4 : Lines 14-34 : remove the hyphen in thread.al-locate_lock()

170 :: 4.5 : Table 4-2 : add a black box containing "3.2" in the margin next to the final row of table

186 :: 4.7.1 : in the 5th para, the "X" should be italic, as in mtsleepX.py

201 :: 4.7.4 : Core Tip sidebar : in the 2nd para, change "camelCase" to "CamelCase"

Chapter 5

219 :: 5.2.4 : LabelFrame, PanedWindow, Spinbox, should be in Courier; also add a black box in the margin containing "2.3"

222-224 :: 5.3.1-5.3.4 : Examples 5.1-5.4 : the scripts tkhello1.py, tkhello2.py, etc., have been renamed as tkhelloA.py tkhelloB.py, etc., respectively. The names don't matter much in the book itself or what you call it on your system, but look for these files with their new names if downloading from this site. The reason for the change is to disambiguate Python 3 versions of each file, i.e., the Python 3 versions are named tkhelloA3.py tkhelloB3.py, etc. This change is global throughout this chapter, and only the new names will used in future and electronic printings of this book.

227-228 :: 5.3.5 : Example 5.5 : the script pfaGUI2.py should be renamed as pfaGUI.py. This change is global throughout this chapter, and only the new name will used in future and electronic printings of this book. On this site, you can also download the Python 3 version of this script... it's named pfaGUI3.py.

243-244 :: 5.4.4 : Line-by-Line Explanation : change subsection titles

Chapter 6

271 :: 6.2.7 : MySQL : in the 1st code section, remove the extra space between "drop" and "database"

272 :: 6.2.7 : PostgreSQL : remove "current" from the first sentence: "...three current Python..."

280 :: 6.2.8 : Porting to Python 3 : at the top of this page, change the "print" in "... to the print/print()-equivalent..." to bold+mono/Courier(but leave "/" as roman and print() as just mono/Courier [no bold]).

281 :: 6.2.8 : Example 6-1 : lines 22-23 : keep the current typeface but bold "lambda" in both lines (just like on lines 113 & 141 on p. 283)

285 :: 6.2.8 : Lines 1-32 : remove "(lines 21-22)" and "(lines 24-32)"

286 :: 6.2.8 : "Lines 34-98" : change hyphen in mysql-connector to a period: mysql.connector; and also remove "(lines 38-50)", "(lines 52-80)", "(lines 53-68)", "(lines 69-78)", "(lines 79-80)", and "(lines 82-95)" as they are all off by one and such level of detail is unnecessary

286-288 :: 6.2.8 : Line-by-Line Explanation : change subsection titles

290 :: 6.3.2 : Setup and Installation : add black box in margin with "2.5, 3.x"

292 :: 6.3.4 : Example 6-2 : remove the extra space indentation in line 11 so that it's flush with line 12

Chapter 7

335 :: 7.3.4 : Example 7-4 : delete line 4 as there is no use of time.sleep() in this script (This change has already been made in the downloadable file on this site.)

Chapter 11

493 :: chapter title : should be in the same font (size+style) as all other chapter titles (likely a paragraph style issue)

Chapter 12

628 :: 12.5.2 : in the 2nd to last para of this section, main.py needs to be in mono/Courier font

Chapter 15

743 :: opening quote : add an em dash in front of the quoter's name


CREDITS

Thanks to the many readers who have provided invaluable feedback and corrections in this section. They include (but are not limited to): ... YOU?!? If you send me something that I don't have and hasn't been already submitted ahead of you in the queue, then you can find yourself publicly acknowledged here!!


[Core Python Applications Programming]
[powered by Python]
© 2001-2012 CyberWeb Consulting
corepython (at) yahoo (dot) com