Errata

Python in a Nutshell

Errata for Python in a Nutshell, Fourth Edition

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed 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."

Official python docs (at both the current 3.12.4 version and 3.7) state: "If a key occurs more than once, the last value for that key becomes the corresponding value in the new dictionary." Later on, it is mentioned that keyword arguments are incorporated in the same way - after the iterable/mapping argument.

Matt Belland  Jul 25, 2024 
Printed Page 51
3rd paragraph

Book: "Generators are also callable"

Due to the terminology confusion explained on page 109, it would be more accurate to say "Generator functions are also callable"

Matt Belland  Jul 25, 2024