Clean-code-in-Python icon indicating copy to clipboard operation
Clean-code-in-Python copied to clipboard

Errata in the book on Page 385

Open dawiediamondinvoke opened this issue 4 years ago • 0 comments

Hi Mariano,

I am reading the Kindle version of the book and would like to query something, I do not know how else to get hold of you.

On page 385 we have the following sentence: "In the simulated version of the third-party client, we put the requirement that the parameters provided must be of string type. Therefore, if the result of the run_process method is not a string,we might expect it to fail, and indeed it does."

I cannot understand why the code just prior to this sentence would fail, since we wrap the result variable with str(). Can you confirm that I am correct in my assessment that the code would not fail? Or am I misunderstanding the description?

It seems that the Process class in example ch08/ut_design_1.py would not fail, but the Process class in example ch08/ut_design_2.py would fail, hence my confusion.

Kind regards,

Dawie Diamond

dawiediamondinvoke avatar Apr 05 '21 12:04 dawiediamondinvoke