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 |
---|---|---|---|---|---|
Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version | Page 88 Kinds of arguments section |
Original contents as follow: if there are more positional arguments that positional parameters, That should be: if there are more positional arguments than positional parameters, Note from the Author or Editor: |
Cendey | Aug 14, 2017 | |
Printed | Page 91 top line |
Correction of errata. The first error in the error list if there are more positional arguments that positional parameters ---- is not located on page 88 but on page 91 in the top line of the printed version. |
Eckhard Stein | Oct 31, 2018 | |
Printed | Page 95 |
On line 3 in the last example an odd character has slipped in. Instead of "return low<=value><high" the line should read: return low <=value<high Note from the Author or Editor: |
Werner Wenzel | May 21, 2017 | |
Page 131 Code example at the bottom of the page |
I believe the code should read this: if isinstance(index, slice): return self.__class__(self[x] for x in range(*index.indices(len(self)))) i.e. there should be a call to index.indices() instead of self.indices(). The text above states that slice objects provide the indices() method. Note from the Author or Editor: |
Tomas Linhart | Dec 26, 2017 | ||
Printed | Page 245 Paragraph "Formatting of user-coded classes" |
1st subparagraph: The 2nd example math.pi.__format__('18.6') should be preceded by import math lest "NameError: name 'math' is not defined" is triggered. 2nd subparagraph: The 1st formatting call should replace "s" by "my_s" and read '{:format_string}'.format(my_s) Its result should read Format string: format_string '42' The 2nd formatting call should replace "s" by "my_s" and read 'The formatted value is: {:anything you like}'.format(my_s) Note from the Author or Editor: |
Werner Wenzel | Jul 15, 2017 | |
Page 295 The os.path Module section |
at the end of the - expandvars expandvars(path) section, the last line says: emits /u/alex/foo/. os.path.expanduser expands a leading ~ to the path of the home directory of the current user. but that line - os.path.expanduser expands a leading ~ to the path of the home directory of the current user. should either be on it's own line or part of it's own entry, it's not clear. |
Anonymous | Nov 28, 2016 | Apr 06, 2017 | |
Printed, Safari Books Online | Page 569 example in add_password |
In the line auth = urlib2.HTTPBasicAuthHandler(x) urllib2 is missing an L. It should read: auth = urllib2.HTTPBasicAuthHandler(x) |
Anna Martelli Ravenscroft |
Sep 28, 2017 | |
Printed | Page 624 3rd paragraph |
Paragraph describes how a dictionary can be used with string formatting to replace placeholders in curly braces. Code example is: t.format(d), should be: t.format(**d). Note from the Author or Editor: |
Bob Polis | Jul 31, 2017 |