Comments 3
Yes, it is true. I wrote the code one week ago and read it now. And now I can't understand what I wrote, for instance. But after reading it a second time, I understand. I didn't write comments and use bad naming. And now I see it clearly.
Couple of examples are not very helpful. For example, "Command Query Separation". Yes, your functions do exactly one thing, but that thing is so atomic, that it is equal to a command that it is called. In "bad" example maybe the programmer assumes that pop and len actions are bounded and len is always needed after pop is called? No need to separate it and make triple code length.
Example for "Functions Should Do One Thing" is far from excellent also. Code that does something versus code that describes dummy functions without a single call...
Now you can look at good example "Error Handling" and consider "Meaningful Naming". At this point a reader will understand that either meaningful naming could be omitted or good example from Error Handling is not good as it should be.
All the principles are good, but examples are very poor and inconsistent.
Python Clean Code: Stop Writing Bad Code — Lessons from Uncle Bob