Work in progress: 181,232 of 181,233 sites checked so far, more every week · updated 2 Nov 2026Missing a blog? Tell us

Top all-time · #7875

T

The Three of Wands

Personal blog · threeofwands.comprogramming

The Three of Wands is a personal blog at threeofwands.com about programming. Since 2021, 10 different Hacker News readers have linked it 15 times, most often “I use Attrs instead of Pydantic”. The last post was in 2023, but the archive is still widely read.

Visit the blog
15mentions?
10HN people?
2021–2025first – last linked?
Links on Hacker News per year · peak 7 in 2023

Too few sampled comments (4) to say how often HN recommends it.?

Why HN links it

HN readers link this blog for its Python library writing, especially its argument for using attrs instead of Pydantic and its piece on approximating sum types in Python with Pydantic.

Summarised by Claude from a sample of 4 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.

My free software stuff.

Most-linked posts?

  1. I use Attrs instead of Pydantic
    4 people · 4 mentions · first linked 2021-08-25
  2. Algebraic Data Types in (Typed) Python
    4 people · 4 mentions · first linked 2023-04-06
  3. Wall vs. CPU time, or the cost of asyncio Tasks
    2 people · 2 mentions · first linked 2022-09-14
  4. The Categories of Bugs in Python Apps
    2 people · 2 mentions · first linked 2023-11-21

What Hacker News says?

  1. rsyring · 2025-07-16Recommends
    To help answer your question, here's a detailed comparison from the attrs project: https://www.attrs.org/en/stable/why.html There's some obvious potential for bias there, but I thought most of the arguments were well reasoned. Edit: found another that I thought was helpful: https://threeofwands.com/why-i-use-attrs-instead-of-pydantic...

    Comment linking /why-i-use-attrs-instead-of-pydantic/

    on “I'm switching to Python and actually liking it”
  2. Submitted I use Attrs instead of Pydantic as a story · 132 points

    HN discussion
  3. I think it would be useful to differentiate more clearly between what is offered by Python's type system, and what is offered by Pydantic. That is, you can approximate Rusts's enum (sum type) with pure Python using whatever combination of Literal, Enum, Union and dataclasses. For example (more here[1]): @dataclass class Foo: ... @dataclass class Bar: ... Frobulated = Foo | Bar Pydantic adds de/ser, but if you're not…

    Comment linking /algebraic-data-types-in-python/

    on “Approximating sum types in Python with Pydantic”
  4. Submitted Python is two languages now, and that's great as a story · 5 points

    HN discussion
  5. I think this was on HN at some point, but this article makes the case for why/when you’d want to use attrs rather than pydantic. https://threeofwands.com/why-i-use-attrs-instead-of-pydantic...

    Comment linking /why-i-use-attrs-instead-of-pydantic/

    on “Attrs – the Python library everyone needs (2016)”
  6. Submitted Wall vs. CPU time, or the cost of asyncio Tasks as a story · 3 points

    HN discussion
  7. C macros are just a text preprocessor. You could run the C preprocessor on a text file and have the result be Python code. Comments might be a little tricky, but it's doable. Or you can run a text file through a general-purpose one like m4. For sum types we have enums, and for product types we have tuples (or namedtuples or dataclasses). Sugar could be done with decorators or metaclasses. For Lisp macros, there's ma…

    Comment linking /algebraic-data-types-in-python/

    on “Ask HN: What are the nice feature you need in a programming language?”
  8. Submitted Algebraic Data Types in (Typed) Python as a story · 2 points

    HN discussion
  9. Submitted On structured and unstructured data, or the case for cattrs as a story · 2 points

    HN discussion
  10. Submitted Attrs iv: Zero-overhead Frozen attrs Classes as a story · 1 points

    HN discussion
  11. Submitted The Categories of Bugs in Python Apps as a story · 1 points

    HN discussion
  12. Submitted The Categories of Bugs in Python Apps as a story · 1 points

    HN discussion
  13. Submitted Why I use attrs instead of pydantic (2021) as a story · 1 points

    HN discussion
  14. Submitted Algebraic Data Types in (Typed) Python as a story · 1 points

    HN discussion
  15. Submitted Wall vs. CPU time, or the cost of asyncio Tasks as a story · 1 points

    HN discussion

Search all of HN for threeofwands.com

Linked by the same people?