Thinking in Python: Bruce Eckel's free book on fluency, types and design
Bruce Eckel has published Thinking in Python, a free intermediate-to-advanced book in five parts and 47 chapters, aimed at Python 3.15, with PDF and EPUB builds on GitHub.
Bruce Eckel, the author behind earlier “Thinking in” titles such as Thinking in Java, has published “Thinking in Python: Fluency, Types, and Design”. The full text is freely readable at thinkinginpython.com, which the site says always carries the current version; PDF and EPUB builds come from a GitHub release, and the examples and exercise solutions live in the same repository.
What the book covers
The book runs to five parts and 47 numbered chapters, plus appendices on effect tracking and on an effect checker. Part I, Foundations, is a fast tour of the language: containers, control flow, functions, modules and packages, classes, static types, class attributes and cleanup. Part II, Techniques, covers testing, data classes as types, pattern matching, decorators, context managers, comprehensions and metaprogramming, and closes with performance and concurrency. Part III, Patterns, works through the classic design patterns and reframes each for Python. Part IV, Functional Programming, covers pure functions, the functools and itertools toolkits, errors returned as values instead of raised exceptions, and a spectrum of assurances that runs up to machine-checked proof. Part V, Effects, surveys languages that track effects in a function's type, develops the generator protocol such tracking depends on, and puts the idea to work with stateless, a library that brings effect tracking to Python today.
Who it is for
Eckel writes for programmers who already know how to program, in another language or in Python, and pitches the book at intermediate to advanced readers: it does not introduce ideas in lockstep, and it picks topics by whether they are interesting rather than by where they fall in a beginner's path. Comfort with functions, classes, objects, inheritance and the usual containers is assumed. Most chapters are self-contained, so the book can be read straight through or opened anywhere. Part I can be skimmed or skipped by people who already know Python, with one exception — the chapter on static typing, since every later chapter annotates its examples. The text targets Python 3.15, and the introduction notes that many chapters started as presentations, mostly at PyCon.
The argument about patterns
The book is as much an argument as a reference. Its stated goal is the judgment to choose the smallest thing that works, built from insights, idioms and patterns. It also questions design patterns themselves: most, it argues, arose to work around the limits of static, inheritance-heavy languages, and in Python many of them diminish or dissolve — a singleton is a module, a visitor is a function that dispatches on type. Before any idiom or pattern is used, the book asks whether the language already solves the problem, and adds complexity only when the answer is no.
Licence and support
The text carries a CC BY-NC-ND 4.0 licence and is free to read. Eckel asks readers who find it useful to support the work through GitHub Sponsors or Ko-fi, adding that there is no obligation and no difference in what readers get. The cover art shows a python coiled into an infinity sign, an ouroboros shape.
SiTech — AI-powered web development
We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.