Book Review: Fluent Python by Luciano Ramalho

Reviews Web Development This post may contain affiliate links. If you buy something we get a small commission at no extra charge to you. (read more)
fluent python

Python development is more popular now than it’s ever been. Newcomers are digging into the language, falling in love, and looking for more learning materials to help them master the intricacies of Python.

Although terse in some areas, Fluent Python is perhaps the absolute best programming book for intermediate-to-advanced developers. Once you get past the basics it can be tough knowing where to go. And Fluent Python offers almost 800 pages full of where to go!

Keep in mind you absolutely need a working knowledge of Python before picking up Ramalho’s book.

In some intermediate books you can kinda fudge your way through with raw basics and looking up concepts as you work. But to get the most from this book you really need to comprehend what you’re reading and apply it in your own work.

Book Contents

In a whopping 792 pages this book covers a lot of ground. The author Luciano Ramalho is a talented programmer who goes into greater depth covering the Python programming language for devs that want to reach that next level.

This book is just huge. It has 21 chapters which are broken up amongst 6 different parts. Here’s a general overview of the content structure:

Part I: Prologue

  1. The Python Data Model

Part II: Data Structures

  1. An Array of Sequences
  2. Dictionaries and Sets
  3. Text versus Bytes

Part III: Functions as Objects

  1. First-Class Functions
  2. Design Patterns with First-Class Functions
  3. Function Decorators and Closures

Part IV: Object-Oriented Idioms

  1. Object References, Mutability, and Recycling
  2. A Pythonic Object
  3. Sequence Hacking, Hashing, and Slicing
  4. Interfaces: From Protocols to ABCs
  5. Inheritance: For Good or For Worse
  6. Operator Overloading: Doing it Right

Part V: Control Flow

  1. Iterables, Iterators, and Generators
  2. Context Managers and else Blocks
  3. Coroutines
  4. Concurrency with Futures
  5. Concurrency with asyncio

Part VI: Metaprogramming

  1. Dynamic Attributes and Properties
  2. Attribute Descriptors
  3. Class Metaprogramming

A good portion of the examples and sample codes get repeated in later chapters, but with a twist based on what you’re learning. This is cool because you can just re-open your lesson work and edit the files to pick up where you left off.

The chapter on coroutines was one of my favorites but also absurdly difficult. Also the difference between iterable and iterator took me a while to get. I can’t say this is the author’s writing style because the content is tough. Although I don’t think it’s written in the clearest fashion either.

This is a book that I simply could not finish. I worked through most chapters, skipped ahead and tinkered elsewhere. But I got a nice taste of the author’s writing style and teaching style.

I think this book could keep you busy for quite a few months, maybe even a year if you work slow. There is just literally so much content and most of it is crazy advanced stuff.

Seriously if you enter this book with lower rudimentary Python knowledge you will struggle. You need to be adept at the syntax, OOP concepts, and ultimately competent with solving your own problems.

This book treats you like an aspiring Python expert and you’ll be expected to follow these lessons the same way. You shouldn’t just copy codes and move along. You need to genuinely understand how they work and why they work, and more importantly why they’re better(or worse) for certain situations.

Practice on your own and try building projects on top of the sample code. Move through a chapter slowly and be willing to integrate what you’ve learned into your own projects. You can even copy codes from the Fluent Python GitHub repo which stores all the code snippets from the book.

github fluent python page

You don’t need to fully understand any of these advanced topics before picking up the book. You don’t need to master subroutines or Python closures before getting to those chapters.

Just understanding enough to build your own apps and solve your own problems will go a long way if you pick up a copy of Fluent Python. This book can teach you everything you need to know about Python, but it also expects you to work hard for that knowledge.

Pros & Cons

Every topic in this book is dense, to the point, and incredibly detailed with code samples and explanations. This will be great for anyone ready to digest the material but it’ll be horrific to anyone who can’t follow along.

Pros:

  • Very detailed explanations and code samples
  • Author clearly knows his stuff and he’s a trustworthy teacher
  • You can learn about basically every advanced Python subject imaginable

Cons:

  • Writing style isn’t the clearest I’ve ever read
  • Topics sometimes feel like they jump without a natural flow

On the pros side we have some impeccable content written by a very knowledgable teacher. Luciano Ramalho has been developing on the web since before 1995 so he’s been working in this industry for over 20 years—almost literally the entire lifespan of the world wide web.

I will admit that in some places his writing style comes across as unclear or too complex. However this may not be a fault of his writing, but rather the difficulty of the material. It’s not easy trying to teach advanced Python and without him in the room to ask questions it can be confusing.

However the code samples are all correct and explained in excruciating detail. The source code is available for free on GitHub and you can work your way through this book with patience and persistence.

Who Is This For?

I want to state this emphatically so that nobody buys this book expecting it to be a beginners introduction to Python.

This book is for working developers who already know a decent amount of Python and want to delve deeper. You should only consider this book if you can already build Python apps and if you feel comfortable writing Python code on your own.

fluent python book release

You should be open minded and willing to try things on your own. The author may hold your hand at some parts. But you will not fully understand these topics unless you apply them yourself.

Fluent Python really is a transformative book. If you can make it through it will take you from an OK developer to an extraordinary professional with the language. Blood, sweat, tears, and maybe urine will all be part of this process.

So who is this book not for? Anyone who doesn’t feel comfortable writing Python code. So if you’re a complete beginner or somewhat of a novice you really need an easier book.

To pick up Python from scratch with a project-oriented teaching style I’d highly recommend Python Crash Course. Or if you want to stick with O’Reilly books check out Learning Python. Both of these would be much more appropriate for beginners or inexperienced developers.

It’s hard to specifically say when you’ll be ready to pick up Fluent Python. In many regards nobody is ever fully “ready”. They just know enough of the basics and have enough tenacity to make it through the material.

If you already feel comfortable with Python and want to drastically improve your knowledge then I would unquestionably recommend this book.

Final Summary

In my mind there’s no reason to doubt how valuable this book is to Python programmers.

Some people learn Python just to understand some basics. Others want to take it far and use it to the fullest potential. And for those people I would highly recommend Fluent Python as a learning resource.

It covers a variety of somewhat intermediate topics up to incredibly advanced topics and everything in between. Just so long as you have a working knowledge of Python before picking up this book you should be able to learn everything you’ve ever wanted to learn about Python programming.

fluent python book cover

Review Rating: 5/5

Author:

Alex is a fullstack developer with years of experience working in digital agencies and as a freelancer. He writes about educational resources and tools for programmers building the future of the web.