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.

What HN saysHN commenters strongly recommend PyMOTW as a concise introduction and a go-to resource for learning the Python standard library.
16HN people shared it
11linked it in comments
6stories submitted
28story points
2 years agolast shared
2013people per year2026

Most-shared posts

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

What HN people wrote when they linked it

brianyu8 · 2024-09-05
If you liked this blog post, I can’t recommend PyMOTW[0] highly enough. It’s my goto for a concise introduction whenever I need to pick up a new Python stdlib module. [0]: https://pymotw.com/3/
rmk · 2024-02-16
Python Modules of the Week (PYMOTW). Great resource to learn the stdlib. https://pymotw.com/3/
lnyan · 2021-07-09
I feel the same way. Last week, I was surprised that `pow` in Python is actually a modpow: `pow(base, exp[, mod])`. Also check https://pymotw.com/3/. It's a great tour of the Python standard library
solotronics · 2020-03-29
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
tedmiston · 2017-06-19
Are you looking more for frameworks and libraries or app level code? For the former, the source of Django, Django Rest Framework, Requests and Flask (as well as most things by Kenneth Reitz and Armin Ronacher) are all great codebases to look at. A few other good resources are the blog PyMOTW 3 [1] and Brett Slatkin's book Effective Python [2]. [1]: https://pymotw.com/3/ [2]: http://www.effectivepython.com/
a3n · 2014-06-12
Maybe this? http://pymotw.com/2/profile/ From here: https://hn.algolia.com/?q=python+profile#!/story/forever/0/python%20pr… 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/
ingve · 2013-07-06
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-idiomat… (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/
anyfoo · 2017-10-21
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.
noufalibrahim · 2016-09-08
This gap is very nicely filled by the Python Module of the Week series https://pymotw.com/3/ which focuses on examples rather than exhaustive docs. I believe the blog is coming out as a book called "Python standard library by example".
ninadmhatre · 2016-04-19
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
cat199 · 2019-08-16
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.htm…

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close