Trey Hunner

I’ve been writing and teaching Python for more than a decade, through articles, talks, conference tutorials, screencasts, and the tools I build for learners.

Writing

A grid of the numbers 1 to 100 from a guessing game. After a guess of 50, the numbers above 50 are grayed out. Binary search in Python with bisect Starts with a number-guessing game you play in the article, then gets into how bisect works.
Terminal recording of the new Python 3.13 REPL. The new REPL in Python 3.13 Shows what’s new with terminal recordings, written the day the feature froze.
Animation showing a Python for loop being copy-pasted into a list comprehension, with each part color-coded.
Python list comprehensions: explained visually Uses color to show how a loop turns into a comprehension.

Talks

Title slide for pathlib: why and how to use it at PyCon US 2026. pathlib: why and how to use it PyCon US 2026. LWN.net wrote about this talk and then asked me to write for them.
Title slide for Python Oddities Explained at PyCon US 2022. Python Oddities Explained PyCon US 2022. Uses surprising Python behavior to explain how the language works.
Trey on stage next to a slide that reads: 2 types of “are they the same?” Variables and objects in Python: it’s pointers all the way down PyCascades 2026.

Tutorials

I’ve taught 11 hands-on tutorials at PyCon US since 2016.

Trey holding up two rubber ducks in a preview video for his Decorators Demystified tutorial.
From the preview for Decorators Demystified.
  1. 2026Lazy Looping in Practice preview
  2. 2025Decorators Demystified preview
  3. 2024Python for Programmers
  4. 2023Intro to Python for Brand New Programmers full recording
  5. 2022Python Metaprogramming
  6. 2021Hands-On Regular Expressions in Python full recording
  7. 2019Lazy Looping in Python
  8. 2018List Comprehensions and Generator Expressions
  9. 2017Hands-On Introduction to Python
  10. 2017Readable Regular Expressions
  11. 2016Readable Regular Expressions

Projects

The Python Morsels home page. Python Morsels My Python skill-building platform, with exercises, screencasts, and articles.
A world map with five red pins, from the Whereabouts Daily challenge. Whereabouts.Earth Teaches you where every country is on a map, a few at a time, using spaced repetition.
Daily Recall, a spaced repetition system for Python programmers. Daily Recall Adds spaced repetition to Python Morsels.

Tools for Python programmers

The f-string format guesser, showing that $1,234.50 comes from the format spec ,.2f. f-string format guesser Type the output you want and get the format spec that makes it.
The undataclass tool, with a dataclass on top and the equivalent regular class below it. undataclass Turns a dataclass into the regular class it stands for.
The Since When tool, listing the Python version that added each feature in a code sample. Since when? Shows which Python version added each feature in your code.

Open source

The EditorConfig logo.
EditorConfig Keeps coding styles consistent across editors, and it’s built into GitHub, GitLab, JetBrains IDEs, Vim, and Xcode, among others. I co-created it with Hong Xu, and it has grown well beyond the two of us.
A terminal showing a large countdown timer.
countdown A full-screen countdown timer for your terminal, handy for presentations and teaching.
django-simple-history Stores a history of changes to Django models. I revived it in 2013 after it had been abandoned, and it’s now maintained by Django Commons.
dramatic Makes Python display its output one character at a time, as if it’s being typed.

There’s more on my blog, my talks page, and my projects page.