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
    D

    Doug Hellmann

    pymotw.com · Personal blog · on HN since 2013

    Doug Hellmann writes Python Module of the Week, a series of tutorials with examples for modules in the Python standard library.

    Visit blogHN submissions
    ProgrammingLanguages & Compilers
    What HN says

    HN commenters strongly recommend PyMOTW as a concise introduction and a go-to resource for learning the Python standard library.

    Stats for nerds
    16HN people shared it
    6linked in comments
    28story points
    Sep 2024last shared
    2013people per year2024

    Top posts on HN

    1. 1
      Python Module of the Week
      9 people · 27 points · first shared 2016 · 1 comments on HN
    2. 2
      Enums in Python
      1 person · 1 points · first shared 2018 · Discussion on HN
    3. 3
      2
      1 person · first shared 2013
    4. 4
      Namedtuple
      1 person · first shared 2017
    5. 5
      Ordereddict
      1 person · first shared 2019
    6. 6
      Threading
      1 person · first shared 2016
    7. 7
      Executors
      1 person · first shared 2019
    8. 8
      Profile
      1 person · first shared 2014

    What HN people wrote when they linked it

    • cat199Aug 2019

      Money down 3 months later:

      1) the gateway or more likely something behind it starts crashing for memory errors when someone is serializing some stupidly large array into it

      2) using ordered vs non-ordered keys on input changes the behavior and fixes it

      3) enabling this checkbox to prevent it fixes the issue and guards against it happening again

      4) everyone has forgotten about this web weenies inquiry into the issue

      5) due to #4, it takes like 3 weeks of system crashes and hairy debugging to find the cause

      6) this guy is long gone, having ridden off into the sunset of smugness

      Also:

      1) fixing the serialization-dependent memory allocation 4 layers deep on the back-end to allow things to operate safely without this checkbox requires a complex change to several other components and associated system-wide validation testing which would take: drumroll "9 people 6 months to complete"

      2) What is the point of this javadoc reference and how exactly does it relate to the issue at hand? Here's a random code doc reference too!: https://pymotw.com/3/collections/ordereddict.html and here also a discussion about impacts: https://mail.python.org/pipermail/python-dev/2016-September/thread.html#146327

    • anyfooOct 2017

      When I recently used python, after a long absence, I was pleased to discover named tuples: https://pymotw.com/2/collections/namedtuple.html

      They basically give you the light syntax you were looking for.

      Related, I was also very pleased to discover mypy for static type checking. I am convinced that it sped up development of my project by an order of magnitude or so. Especially since I was using the also new async/await syntax (something I was also very pleased to discover for my particular project, and it had nothing to do with the web). The use of async/await leads to quite elaborate types, with easily made mistakes that are very painful if only caught at runtime, instead of trivially at compile time.

      Together, named tuples and static type checking brought in some much missed aspects of C into python.

    • ingveJul 2013

      If you work with other languages in addition to Python, it's easy to fall back into old habits. You should internalize the content from these two excellent presentations:

      Raymond Hettinger's "Transforming Code into Beautiful, Idiomatic Python":

      http://pyvideo.org/video/1780/transforming-code-into-beautiful-idiomatic-pytho

      (pyvideo.org has a lot of other great talks and presentations.)

      Ned Batchelder's "Loop Like A Native":

      http://nedbatchelder.com/text/iter.html

      Python Module of the Week is also an excellent resource:

      http://pymotw.com/2/

    • a3nJun 2014

      Maybe this? http://pymotw.com/2/profile/

      From here: https://hn.algolia.com/?q=python+profile#!/story/forever/0/python%20profile

      I use pinboard to bookmark anything that I think has the slightest chance that I'll want to see it again. Most of the time I never look at a bookmark again, because you usually don't know what you'll need in the future. But I've found enough things like what you're looking for (but not this time obviously) that the practice has become worthwhile.

      https://pinboard.in/

    • ninadmhatreApr 2016

      I dont have access to python 3.5 but i tried above code with some modifications and it worked!

      1. `while True` has no break condition and that intentional but `mt.join()` basically waits till all threads are completed? are you looking thread that keeps on running? i suggest look at daemon thread? if yes, check this https://pymotw.com/2/threading/#daemon-vs-non-daemon-threads

      2. `return` & `yield from None` are not required! I had commented those lines, also 'from' is a reserved keyword

    • solotronicsMar 2020

      Python3 has pretty good built in modules for asyncio, multiprocessing, and multithreading. Maybe port to py3 and utilize these features as an intermediate step while you are working on the jump to Go. I like to take a function for a single work unit "do a single thing" and then call it from a function utilizing asyncio and multithreading, this link shows a great examples.

      https://pymotw.com/3/asyncio/executors.html

    Related

    Valued Lessonsvaluedlessons.com19 people

    Monads in Python (with nice syntax)

    Valued Lessons
    Personal · last shared 2019
    Andrew Godwinaeracode.org68 people

    Hello, This Is London Rising: 3D Printing Maps from LIDAR Data

    Andrew Godwin
    Personal · last shared 2025
    Dan Baderdbader.org26 people

    Interfacing Python and C: Advanced “ctypes” Features

    Dan Bader
    Personal · last shared 2022
    Guido van Rossumneopythonic.blogspot.com105 people

    Guido van Rossum: Before Python

    Guido van Rossum
    Personal · last shared 2025
    Fredrik Lundheffbot.org64 people

    Simple Top-Down Parsing in Python

    Fredrik Lundh
    Personal · last shared 2023
    Miguel Grinbergblog.miguelgrinberg.com94 people

    Python 3.14 is here. How fast is it?

    Miguel Grinberg
    Personal · last shared 2026
    Hillel Waynehillelwayne.com294 people

    1/0 = 0

    Hillel Wayne
    Personal · last shared 2026
    Dev Geniusmedium.com/dev-genius36 people

    A principled approach to GraphQL query cost analysis

    Dev Genius
    Publication · last shared 2026