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 |
---|---|---|---|---|---|
Page Page 457 Table 15-9 (SimpleQueue part) |
In Table 15-9, the SimpleQueue is described as "an unbounded FIFO queue lacking the methods full, task_done, and join (see Table 15-10)" which suggests that these methods are listed in 15-10, but only the method full is listed there. The task_done and join methods are only explained in the text surrounding the table. Note from the Author or Editor: |
Ivo Grondman | Mar 07, 2023 | ||
Page p156 last section |
in methods list, missing method `__rtruediv__` after `__radd__` Note from the Author or Editor: |
Tim Stamp | Aug 25, 2023 | ||
Page 42 and 698 P. 42 — 2nd row of Table 3-2; p. 698 — Index |
Underscore in “from_hex” should be removed, so that the resultig name of this method will be “fromhex”. This relates to three instances of “from_hex” on p. 42 and to one — on p. 698. Note from the Author or Editor: |
Vadim Flyagin | Aug 01, 2024 | ||
Page 43 Paragraph entitled “Sequences” |
This paragraph contains a reference to the same page on which it is printed: “as discussed in “Sequences” on page 43” ”. Two typose are here: 1) the sign of the closing quote (”) after the number “43” is not matched and so should be deleted; 2) this page (i. e. 43) does not contain information to which this reference points (“Library and extension modules provide other sequence types, and you can write others yourself”), so I guess that the page number to which this reference points should be changed, or, alternatively, the reference should be deleted if case when there is no such information in the book. Note from the Author or Editor: |
Vadim Flyagin | Jul 30, 2024 | ||
Page 49 5th paragraph |
Book states: "If a key's value appears more than once in a dictionary expression, only an arbitrary one of the items with that key is kept in the resulting dictionary object -- dictionaries do not support duplicate keys." Note from the Author or Editor: |
Matt Belland | Jul 25, 2024 | ||
Page 51 3rd paragraph |
Book: "Generators are also callable" Note from the Author or Editor: |
Matt Belland | Jul 25, 2024 | ||
Printed, O'Reilly learning platform | Page 59 Code example beginning with "re_match =" |
Regular expression should be `r'Name: (\S+)` to capture a full name (currently just captures the first character). Occurs in 2 places in this code example. |
Paul McGuire |
Nov 26, 2023 | |
Page 126 2nd title |
This section would be better titled without reference to "Unbound Objects". Unbound methods were a 3rd form of method in python2, in addition to bound methods and function objects. Note from the Author or Editor: |
Matt Belland | Aug 01, 2024 | ||
Page 127 5th paragraph |
The bound method read-only attributes im_class, im_func, and im_self were removed in the transition to Python 3. im_class was replaced by __self__, im_func was replaced by __func__, and im_class does not have a direct replacement, but class information can be inferred from __func__.__qualname__ or from the instance's __class__. Note from the Author or Editor: |
Matt Belland | Aug 01, 2024 | ||
Page 135 code |
You don't need to print(AClass.astatic()), as that method already prints the desired output. The extra print() calls in this line and the next result in a couple of 'None' lines being printed to the output. Note from the Author or Editor: |
Matt Belland | Aug 01, 2024 | ||
Page 254 table entry for "filter" function |
Parantheses are not "paired": Note from the Author or Editor: |
Marek Włodarz | Sep 05, 2023 | ||
Printed | Page 256 Description of "map()" function |
The code examples for map() read as: |
Paul McGuire |
Dec 11, 2023 | |
Printed | Page 262 Code fragment for ps1,ps2 |
Classes Ps1 and Ps2 are defined as inheriting from object, this is no longer necessary in Python 3 and should be removed. |
Paul McGuire |
Dec 11, 2023 | |
Printed | Page 273 Code example beginning with "import heapq" |
Class KeyHeap is defined as inheriting from object. This is a legacy from Python 2, no longer required in Python 3. The first line of the class declaration should be: |
Paul McGuire |
Dec 11, 2023 | |
Printed | Page 284 Table of str methods |
Omitted entries for str.partition and str.rpartition. |
Paul McGuire |
Apr 25, 2024 | |
Printed | Page 289 Code example starting with ">>> name = 'Dawn'" |
The second line of the example reads: |
Paul McGuire |
Dec 11, 2023 | |
Page 471 Code snippet on that page |
The code on this page isn't safe to be called from multiple threads. For example, this code will occasionally detect errors where some results are returned "out of order". Note from the Author or Editor: |
Dave Slotnick | Nov 15, 2023 | ||
Page 578 Code block, 4th last line |
"cconcurrent.futures" instead of "concurrent.futures" Note from the Author or Editor: |
Tim Stamp | Sep 25, 2023 | ||
Page 674 - What's new in Python 3.8 2nd line of table, after headers |
The entry lists "Positional-only and named-only parameters (/ and * arg separators)". Only positional-only arguments (/ symbol in function signature) are new in Python 3.8 - see PEP-570. Keyword-only arguments (* symbol) were introduced back in Python 3.0 - see PEP-3102. Note from the Author or Editor: |
Matt Morrison | May 01, 2023 | ||
Printed | Page 681 entry for enum.StrEnum |
enum.StrEnum was erroneously listed in the table of changes in Python 3.10, but this change was not actually made until Python 3.11. This entry should be moved to the table for Python 3.11 (approx. p. 684) |
Paul McGuire |
Nov 16, 2023 |