News for hackers. Stuff that matters.
Re:Just Use Dictionaries (Python) by sametmax on Sunday September 03, 2023 @06:44AM (#37369307)
I used to be a strong proponent of this, but I tend to use dataclasses more and more with time. Still use a lot of dicts, lists, and sets, but mostly as collections, rarely to hold one single element data.

It came naturally, not out of some design, but I guess having better and better typing support everywhere makes it more and more convenient.

Re:Just Use Dictionaries (Python) by david-j-vujic on Sunday September 03, 2023 @01:27PM (#37372196)
Sounds like a good balance between the approaches!

I usually would prefer having everything behind the endpoint (such as Pydantic schemas & FastAPI) as simple dicts and lists.