Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    T

    Trey Hunner

    treyhunner.com · Personal blog · on HN since 2014

    Trey Hunner, a Python trainer, writes tutorials on Python idioms, built-ins, comprehensions and tooling, including uv scripts.

    Visit blogRSSHN submissions
    ProgrammingLanguages & Compilers
    What HN says

    HN commenters link his lazy self-installing uv script post for the shebang trick, and his animated list comprehension and PyCon posts.

    Stats for nerds
    31HN people shared it
    38linked in comments
    1.6Kstory points
    Oct 2025last shared
    2014people per year2025

    Top posts on HN

    1. 1
      Python built-ins worth learning
      2 people · 575 points · first shared 2019 · 118 comments on HN
    2. 2
      Asterisks in Python
      2 people · 222 points · first shared 2018 · 106 comments on HN
    3. 3
      Counting Things in Python: A History
      2 people · 213 points · first shared 2015 · 51 comments on HN
    4. 4
      Multiple assignment and tuple unpacking improve Python code readability (2018)
      2 people · 169 points · first shared 2018 · 96 comments on HN
    5. 5
      Python List Comprehensions Explained Visually
      1 person · 138 points · first shared 2015 · 78 comments on HN
    6. 6
      Stop writing lambda expressions in Python
      1 person · 123 points · first shared 2018 · 194 comments on HN
    7. 7
      The Idiomatic Way to Merge Dictionaries in Python
      2 people · 38 points · first shared 2016 · 9 comments on HN
    8. 8
      The new REPL in Python 3.13
      1 person · 33 points · first shared 2024 · 18 comments on HN
    9. 9
      Lazy self-installing Python scripts with uv
      4 people · 11 points · first shared 2024 · 1 comments on HN
    10. 10
      Overusing list comprehensions and generator expressions in Python
      3 people · 9 points · first shared 2019 · Discussion on HN

    What HN people wrote when they linked it

    • asicspNov 2021

      I'm a self-published author and these are my offers till end of this month:

      1) "Practice Python Projects" (https://learnbyexample.gumroad.com/l/py_projects/blackfriday) ebook is free (normal price $10)

      2) "Learn by example Python bundle" (https://learnbyexample.gumroad.com/l/python-bundle/blackfriday) is $2 (normal price $12) - three ebooks titled "Python re(gex)?", "100 Page Python Intro" and "Practice Python Projects"

      3) "All Books Bundle" (https://learnbyexample.gumroad.com/l/all-books/blackfriday) is $5 (normal price $22) - includes all three Python books mentioned in the bundle above and eight other books on regular expressions and CLI one-liners

      ---

      I know a couple of blog posts by indie creators with their own sales and links to other programming deals:

      * https://treyhunner.com/2021/11/python-black-friday-and-cyber-monday-sales-2021/

      * https://www.blog.pythonlibrary.org/2021/11/24/python-black-friday-cyber-monday-sales-2021/

    • peter_l_downsApr 2014

      Yeah, that would be awesome. I haven't looked into it yet but if you'd be willing to help out we'd be happy to accept contributions! The one thing that I think might be tricky with including standard migrations is keeping them compatible with Django 1.4-1.6; although it seems to be possible to have both in a given package [0] it doesn't seem all that user-friendly.

      [0]: http://treyhunner.com/2014/03/migrating-to-django-1-dot-7/

    • celiasOct 2019

      Here are a couple of articles about attending PyCon

      Trey Hunter's article "How to have a great first PyCon" including advice on how to overcome feeling like an imposter or an outsider
      https://treyhunner.com/2018/04/how-to-make-the-most-of-your-first-pycon/

      Al Sweigart's PyCon advice, including his shirt color trick for meeting new people
      https://automatetheboringstuff.com/how-to-do-pycon.html

    • sdoeringJul 2020

      Thank you very much. I am using python for some time now. Stumbled upon this, but never took the time to read up on it. If anybody also wants to know more I found this extensive post explaining the concepts behind * and in python (not in multiplication):
      https://treyhunner.com/2018/10/asterisks-in-python-what-they-are-and-how-to-use-them/

    • simonwJul 2025

      Use this as your shebang line:

      #!/usr/bin/env -S uv run --script https://treyhunner.com/2024/12/lazy-self-installing-python-scripts-with-uv/

      I don't think requiring all CLI tools to be "native binaries" makes sense. Plenty of popular CLI tools are not compiled binaries. The Python and Node.js ecosystems run on those.

    • tsurantinoDec 2015

      For those confused - the visual part is done in a GIF (i.e. http://treyhunner.com/images/list-comprehension-condition.gif).

      I think animating the transformation from a normal loop to a list comprehension is a great way to show how the syntax translates between the two forms. Very awesome and comprehensive post.

    Related

    Mouse Vs Pythonblog.pythonlibrary.org16 people

    Python 101: An Intro to logging

    Mouse Vs Python
    Personal · last shared 2025
    Dan Baderdbader.org26 people

    Interfacing Python and C: Advanced “ctypes” Features

    Dan Bader
    Personal · last shared 2022
    Drew Breunigdbreunig.com43 people

    DuckDB is probably the most important geospatial software of the last decade

    Drew Breunig
    Personal · last shared 2026
    David Beazleydabeaz.com162 people

    (Python) Generator Tricks For Systems Programmer (pdf)

    David Beazley
    Personal · last shared 2026
    Ben Hoytbenhoyt.com64 people

    Performance comparison: counting words in Python, Go, C++, C, Awk, Forth, Rust

    Ben Hoyt
    Personal · last shared 2026
    Simon Willison's TILstil.simonwillison.net111 people

    One-liner for running queries against CSV files with SQLite

    Simon Willison's TILs
    Personal · last shared 2026
    Hynek Schlawackhynek.me83 people

    I’m a productive programmer with a memory of a fruit fly

    Hynek Schlawack
    Personal · last shared 2026
    Al Sweigartinventwithpython.com100 people

    Nobody Wants to Learn How to Program

    Al Sweigart
    Personal · last shared 2026