Book review: Fluent Python, by Luciano Ramalho

posted: February 12, 2017

tl;dr: A great book to level up your Python knowledge and coding skills...

It took me a while to make it all the way through Fluent Python, as the O’Reilly ePub version that I read on my iPad has exactly 1000 pages, plus appendices, index, and numerous code samples. Fluent Python is quite an achievement for author Luciano Ramalho: it is an understandable, well-written, technically astute description of all the major aspects of the language, written by someone with many years of in-depth experience with, and a passion for, Python.

While Python is simple on the surface, which is why it is such a great language for beginners, there is tremendous power lying beneath. Python is an object-oriented language to its very core, with the ability to create new classes and metaclasses, but it is also possible to code in a completely functional style, or in a pure command-line scripting style. Python’s power is available to the Python programmer on an as-needed basis, which is one of its great strengths.

Ramalho’s goal with Fluent Python is to give programmers who already know some Python the knowledge they need to advance to the next level, to turn Python beginners into Pythonistas: skilled Python programmers who put the powers of Python to practical use in their intended ways. You probably won’t become a Python core contributor immediately after finishing Fluent Python, but unless you are already a Python core contributor there is much you will learn.

Fluent Python is organized by topic, covering all the major aspects of the language, from the data model all the way up to metaprogramming. I especially enjoyed Ramalho’s discussion of strings and Unicode, generators, functions as first-class objects, co-routines, asynchronous programming, and metaclasses. While I don’t expect to be using metaclasses anytime soon, and Ramalho warns they are not needed for most applications, the metaclass discussion does give insight into how the Python language itself is constructed. By the time you finish Fluent Python, you will have a grasp on what the language is actually doing under the hood.

I’ve run across most of the topics covered in Fluent Python before, which allowed me to appreciate the thoughtful way that Ramalho presents information. Ramalho eases into new topics, gradually explaining them in more technical depth alongside code examples specifically written to illustrate the topic at hand in as few lines as possible. It is easy to grab the code and run it in the Python interpreter and get the exact same output as Ramalho. The examples that Ramalho chooses are practical ones; even the metaclass example is one that yields some potential real-world benefits.

I will definitely be referring to Fluent Python for years to come, as it will become one of the primary texts that I use as a reference, along with Python’s online documentation. I can heartily recommend Fluent Python if you want to learn enough about the language to become a Pythonista.