Errata

Learning Python

Errata for Learning Python, Fifth 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 page 48
First paragraph "what not to type: prompts and comments"

Cygwn typo should be Cygwin

Stuart Cooper  Oct 14, 2024 
PDF Page 152 Section titles: Hex, Octal, Binary: Literals and Conversions
Second last example on page 152

On Page 152 of 5th edition of the book, it is written that:

> Finally, you can also convert integers to base-specific strings with string formatting method calls and expression, **which return just digits, not Python literal string:**

>>> '%o, %x, %x, %X' % (64, 64, 255, 255)
'100, 40, ff, FF'

Note the problematic part above which says "which return just digits, not Python literal string". This is clearly a mistake as we can see the result is a string not a digit. Moreover, this also contradicts with what is given on page 156

> string formatting produces a string, not a number:

So as we can see, now on page 156, it says that the result is a string not a number. So there seems to be contradiction between the two quoted references(on page 152 and page 156)

Anoop Rana  Oct 02, 2024