Comprehensible Comprehensions
Hello! 👋
This page contains resources I recommended and sources of inspiration for my talk Comprehensible Comprehensions. You'll also find slides and some information about my Python skill-building service, Python Morsels.
If you'd like to start a conversation with me or keep up with my work, you can find details on me at the bottom of this page.
The slides 💻
You can find the slides for the talk at
Recording of this talk 🎥
You can watch a recording of an earlier version of this talk from PyCon Australia 2017.
Related resources 📚
- Python List Comprehensions: Explained Visually (me): an article I wrote that reviews similar concepts to this talk
- Lazy Looping: The Next Iteration (me): in this talk I discuss the use of generator expressions and generator functions in greater depth
- Facts and Myths about Python names and values (Ned Batchelder): this talk is a great overview of the two types of "change" in Python mutation and assignment
- Lazy Looping in Python: Making and Using Generators and Iterators (me): This is a 3 hour tutorial I gave on this topic at PyCon 2019
- Loop Better: a deeper look at iteration (me): a talk diving into Python's iterator protocol
- The Iterator Protocol: How “For Loops” Work in Python (me): an article looking at the iterator protocol that powers Python's "for" loops
- Names, Objects, and Plummeting From The Cliff (Brandon Rhodes): this talk is focused on garbage collection in Python, but it's also a great explanation of how Python's variables work under the hood! The topics overlap with Ned Batchelder's Facts and Myths talk above.
- Loop Like a Native (Ned Batchelder): a dive into the many ways of looping in Python
- How to make an iterator in Python (me): generator functions, generator expressions, and iterators
- Looping Like a Pro in Python (David "DB" Baumgold): a good follow-up to Ned Batchelder's Loop Like a Native
Who am I? ✨
My name is Trey and I help professional programmers improve their Python skills.
I do on-site and remote Python training for teams and corporations and I run a Python skill-building service for individuals called
I write articles regularly at treyhunner.com. If you'd like to keep up with my writing, sign up for my email newsletter. You can also find me on Twitter as @treyhunner.
Explore interesting Python features every week 🕵️♀️
The best way to improve your skills is to practice. It's hard to practice unless you have a regimen and a routine. Making a practice routine on your own is time-consuming and hard.
Python Morsels can help! Through Python Morsels, every Monday I send out one Python exercise. These exercise are meant to help professional Python programmers to hone their skills, not brand new programmers. They've been described as "Kreutzer's etudes for Python" and "like a reverse code review".
I send out the exercise on Monday morning which includes a base problem, bonuses, and automated tests to run against your code. The exercise should take you up to 30 minutes. On Wednesday I send out an email explaining different solutions for the exercise and why we might choose one technique over another.
If you'd like to try these out yourself, type in your email below: