Submission timeline
2007–2026One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.
First comments on top threads
HN comment orderLooking in the implementation of the Python version of ABC[0], you'll see that `__subclasshook__` doesn't do any language magic, it just registers the method to be called in `__instancecheck__`. So if you just implement `__instancecheck__` directly, you get the same behavior, but without the caching around it. class OneWayMeta(type): seen_classes = set() @classmethod def __instancecheck__(cls, instance): C = instance.__class__ print(f"trying {C}") if C in cls.seen_classes: return False cls.seen_classes |= {C}…
My favorite Python "crime" is that a class that defines __rrshift__, instantiated and used as a right-hand-side, lets you have a pipe operator, regardless of the left-hand-side (as long as it doesn't define __rshift__). It's reasonably type-safe, and there's no need to "close" your chain - every outputted value as you write the chain can have a primitive type. x = Model.objects.all() >> by_pk >> call(dict.values) >> to_list >> get('name') >> _map(str.title) >> log_debug >> to_json It shines in notebooks…
The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.
- Breakout years
- 2
- Total points
- 667
- Total comments
- 233
100+ points or 50+ comments
reference only — not used in Hall rules or ranking
reference only — not used in Hall rules or ranking
Every submission
| Date | Title as submitted | By | Points | Comments |
|---|---|---|---|---|
| 2022-08-01 | Crimes with Python's Pattern Matching | todsacerdoti | 6 | 0 |
| 2022-08-02 | Crimes with Python's pattern matchingFirst breakout · Best thread | signa11 | 406 | 120 |
| 2025-08-21 | Crimes with Python's Pattern Matching (2022)Latest 20+ point return | agluszak | 255 | 113 |
