Python for DevOps

Errata for Python for DevOps

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. 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
Under "Machine Learning Key Terminology"

What I see : Supersized machine learning

What it should be : Supervised machine learning

Note from the Author or Editor:
on pg 389 of the book

Swaroop  Mar 05, 2020  Jun 19, 2020
Page 28
1st paragraph

The text says

"You can use comma-separated individual characters in a character set or use ranges."

Commas are not necessary in a range. If a comma is specified in a character range, the comma becomes part of the range itself.

>>>'[R,B]obb[yi]', 'Robbi')
<re.Match object; span=(0, 5), match='Robbi'>

In the above example, the first character set contains "R", "," and "B", so "Robbi" matches.

>>>'[R,B]obb[yi]', ',obbi')
<re.Match object; span=(0, 5), match=',obbi'>

Again, the first character set contains "R", "," and "B", so ",obbi" matches, which is definitely not what you want.

>>>'[R,B]obb[yi]', 'Robb,')

In all three examples, the "[yi]" contains only two characters, "y" and "i". Here we try to match "Robb," but because "," does not match "y" or "i", it doesn't match.

Note from the Author or Editor:
>>>'[R,B]obb[yi]', ',obbi')
<re.Match object; span=(0, 5), match=',obbi'>

Should be replaced with:

>>>'[RB]obb[yi]', ',obbi')
<re.Match object; span=(0, 5), match=',obbi'>

Andy Lester  Mar 14, 2020  Jun 19, 2020
Page 44
In [1]

Example of log file format page 44 last 3rd of the page reads as: - swills [13/Nov/2019:14:34:30 -0000] "GET /assets/234 HTTP/1.0" 200 2326

Later code example on page 45, In [64] parses for date in the above format, however, In [1] reads as:
In[1]: line = ' - rj [13/Nov/2019:14:34:30] "GET HTTP/1.0" 200'

line should read as:
In[1]: line = ' - rj [13/Nov/2019:14:34:30 -0000] "GET HTTP/1.0" 200'

Anonymous  Feb 09, 2020  Jun 19, 2020
Page 71
Example 3-5.

Docstring for click example reads as:
Command-line tool using argparse

Docstring for click example should read as:
Command-line tool using click

Note from the Author or Editor:
"Command-line tool using argparse"
should be replaced with:
"Command-line tool using click"

Anonymous  Feb 09, 2020  Jun 19, 2020
Page 77

Code block referencing the "./ ships sail" starts with the bash prompt $ as such.
$ ./ ships sail

Later example in that block also include the full bash prompt
chapter3$ ./ ships list.

It is clearly an editing error for the code, but make it appear, unedited.

Note from the Author or Editor:
The 'chapter3$' which appears twice in the example should be replaced with '$'

John MacTaish  Feb 12, 2020  Jun 19, 2020
Page 80
Paragraphs following topic heading, Using the Mumba Juist-in-time (Jit) Compiler

As another user has noticed:

Code examples discuss a program named that takes click arguments and performs array functions.

This code is never introduced, only referenced from pg 80 through the end of the chapter, in snippets, referencing the click functions.

In addition an array is used to demonstrate some examples but that array is never introduced, but is only referenced as rea = real_estate_array()

This leads to an extremely confusing introduction to the topic, almost as if several paragraphs and a code block, were left out, right before the words, "First, use a timing decoration to get a grasp on the runtime of your functions."

I found the complete code listing on Noah Gift's web site:

Note from the Author or Editor:
Yes, we should swap up the code sample for this updated version:

Anonymous  Apr 07, 2020  Jun 19, 2020
Page 282
last block of code snippen at beginning of the page

Logging - Deeper configuration

Code snipet says


Must be\:


Anonymous  May 16, 2020  Jun 19, 2020