Further Reading from Fluent Python
2015-11-23I’m reading Luciano Ramalho’s Fluent Python right now. It’s a great book. I’m particularly enjoying the Further Reading sections that end each chapter. Here are some of my highlights.
Chapter 1: The Python data model
- Data model in The Python Language Reference
Chapter 2: An array of sequences
- Why numbering should start from zero by Edsger W. Dijkstra
Chapter 4: Text versus bytes
- Pragmatic unicode by Ned Batchelder at PyCon 2012
- Character encoding and unicode in Python by Travis Fischer and Esther Nam at PyCon 2014
- Chapter 3 of Dive Into Python by Mark Pilgrim
- Processing text files in Python 3 by Nick Coghlan
Chapter 5: First-class functions
- Functional programming HOWTO
- Raymond Hettinger on function annotations at Stack Overflow
- Alex Martelli on
functools.partial
at Stack Overflow
Chapter 6: Design patterns with first-class functions
- Design patterns with dynamics languages by Peter Norvig
Chapter 7: Function decorators and closures
- Python decorators in 12 steps by Simeon Franklin (not mentioned in Fluent Python, but I’d been meaning to read it for a while, so I’m putting it here)
- The decorator module documentation by Michele Simionato
- Blog posts on decorators and monkey patching by Graham Dumpleton
- Closures in Python by Fredrik Lundh
- The roots of Lisp by Paul Graham
Chapter 8: Object references, mutability and recycling
- Python 103: Memory model & best practices by Wesley Chun
Chapter 9: A Pythonic object
- Format Specification Mini-Language in The Python Language Reference
- The definitive guide on how to use static, class or abstract methods in Python by Julien Danjou
Chapter 11: Interfaces: from protocols to ABCs
- Contracts in Python: A conversation with Guido van Rossum by Bill Venners
Chapter 12: Inheritance: for good or for worse
- Python’s super is nifty, but you can’t use it by James Knight
- Super considered super by Raymond Hettinger
- Setting multiple inheritance straight by Michele Simionato
Chapter 14: Iterables, iterators, and generators
- Loop like a native by Ned Batchelder at PyCon 2013 (not mentioned in Fluent Python)
- Iterables vs. iterators vs. generators (not mentioned in Fluent Python)
- Generator Tricks for Systems Programmers by David Beazley (not mentioned in Fluent Python)
Chapter 15: Context managers and else blocks
- Raymond Hettinger on
try-except-else
at Stack Overflow - What makes Python awesome by Raymond Hettinger at PyCon 2013
- Transforming code into beautiful, idiomatic Python by Raymond Hettinger at PyCon 2013 (see also Jeff Paine’s notes)
- The Python
with
statement by example by Jeff Preshing redirect_stdout
incontextlib
utilities
Chapter 16: Coroutines
- Flattening a nested sequence with
yield from
from the Python Cookbook, 3rd edition - A curious course on coroutines and concurrency by David Beazley (videos: 1, 2, 3)
- Consider coroutines to run many functions concurrently by Brett Slatskin implements Conway’s game of life with coroutines. Ramalho provides a refactored version
- Iterables, Iterators and Generators by Ian Ward implements Rock-Paper-Scissors with coroutines
- Writing a discrete event simulation: ten easy lessons by Ashish Gupta
Chapter 19: Concurrency with futures
- The future is soon by Brian Quinlan at PyCon AU 2010
- Understanding the GIL by David Beazley at PyCon 2010
Chapter 18: Concurrency with asyncio
- Fan-in and fan-out: The crucial components of concurrency by Brett Slatkin at PyCon 2014
Chapter 19: Dynamic attributes and properties
- The simple but handy “collector of a bunch of named stuff” class by Alex Martelli
Chapter 20: Attribute descriptors
- Descriptor HOWTO by Raymond Hettinger
- The Python object model by Alex Martelli
- Python warts by A. M. Kuchling
Afterword
- A Python æsthetic: beauty and why I python by Brandon Rhodes
- The Hitchhiker’s Guide to Python
Books
Several books are mentioned repeatedly in the Further Reading sections, or otherwise caught my eye:
- Python Cookbook, 2nd Edition edited by Alex Martelli, Anna Martelli Ravenscroft, and David Ascher, and…
- Python Cookbook, 3rd Edition by David Beazley and Brian K. Jones. The second edition was written for Python 2.4. According to Ramalho, the third edition, ‘which was rewritten from scratch, focusses more on semantics of the language, particularly what has changed in Python 3, while the second edition emphasizes pragmatics’ and ‘it is worthwhile to have both editions on hand’. The 3rd edition is mentioned in the Further Reading section of almost every chapter of Fluent Python.
- Python in a Nutshell, 2nd Edition by Alex Martelli (covers Python 2.5, but apparently especially clear and authoritative on the data model)
- Python 3: Essential Reference, 4th Edition by David Beazley
- Design Patterns: Elements of Reusable Object-Oriented Software by Gamma, Helm, Johnson, Vlissides
- Head First Design Patterns by Eric Freeman, Bert Bates, Kathy Sierra and Elisabeth Robson
- Effective Python by Brett Ratkin