Pythonic Programming
Author: Dmitry Zinoviev
Review created: 2022-08-05
Pythonic Programming aims to teach us how to practise pythonic programming. I.e. how to program Python the way it is meant to be programmed, like the experts do. It does that through 100 short tips, where the length of each tip can range from half a side to a couple of sides. The typical length of a tip is around one side.
The tips in the book is divided into six chapters, each containing tips concerning a certain topic. The subjects of the chapters are:
- Documentation Tips
- General tips
- Data Types and Data Structures Tips
- Function Tips
- Performance Tips
- Safety Tips
Each tip focuses on one small detail of the Python programming languages. Some of the tips tells us really simple, basic (but useful) things. Like for example tip 79 that describes how to strip whitespace from user inputted strings. Other tips are more complex, like tip 26 that describes how to transpose a multi-dimensional list using zip()
.
The book is very well written and easy to read. The author seems to have good sense of humour that he uses frequently in the book. He is also not shy about expressing his opinions about on exactly how things should be done using Python, which is a very good thing in a book about pythonic programming :)
I like the format of the book very much. As each tip is so short, you can pick up the book when you have a moment over, read some tips and then put the book down having the feeling that you finished something. This put together with the fact that the contents of each tip is really useful, I highly recommend the book to any Python programmer that wants to sharpen his/her skill and program in a more native, Pythonic, way.
It should be said, however, that the book is not geared toward beginner programmers. The author expects you to have programmed in Python for a while. To get the most out of the book, you should also have been exposed to many different parts of the language. This as the tips in the book cover a broad range of subjects, and to take full advantage of it, it is good to be at least a little familiar with the subjects from the start.
Summary: Pythonic Programming gives really solid tips about how to become a better Python programmer. It should be written by people that have used the Python language for a while and who wants to take the next step to becoming a native speaker. Perhaps it should be every Python programmers second or third book about the language. The book is also highly readable and has a great format. Highly recommended!