Readability Counts
summary
Advocates concrete rules: prefer 60-character text width and place line breaks to show logical structure, use trailing commas with a closing parenthesis on its own line, and publish a project style guide that goes beyond PEP8. Favor descriptive names and tuple unpacking instead of numeric indexes, extract helpers so high-level code reads like English, replace try/finally cleanup with contextlib.closing or a custom context manager, use list comprehensions for map/filter patterns, implement containers with dunder methods or use classes when the same data flows through several functions.
AI-written summary · about
chapters (10)
- 0:00Start
- 3:22Line Breaks
- 9:02Tuple Unpacking
- 13:16A Complex Django Model Method
- 14:48Brief Recap
- 15:22Code Constructs
- 15:39Specific Problems Call for Specific Solutions
- 16:06Context Manager
- 18:32Functions
- 19:19Recap
related talks
20mGood Code is a Balancing Act
24mPython for Humans, Designing Python Code Like a User Interface
17mReady for Readable Code?
25mPEP 8: How to Avoid Being a Python Hooligan
39mRead my code, or why writing readable code matters
40mGood Code: What, Why, and How to Get There
18mWriting Quality Code
29mPsychology of Code Readability
