News for hackers. Stuff that matters.
Re:Using Enumerated Types in Python by gorgoiler on Sunday June 07, 2020 @08:05AM (#23446786)
Named tuples, the example I called out, are a good improvement over dicts for adhoc structs that don’t require full class definitions.

But you’re right. It’s hardly cumbersome to create classes that simply exist to contain data in a sightly more structured way than a dict.

Re:Using Enumerated Types in Python by nemetroid on Monday June 08, 2020 @01:10PM (#23458433)
> Named tuples, the example I called out, are a good improvement over dicts for adhoc structs that don’t require full class definitions.

Doesn't a lot of that improvement come from the fact that they have a name, though? I guess you could argue for an "UnnamedTuple" which only enforces tuple size and member names. But if you're able to specify the member names, it feels like the thing being represented is concrete enough that you should be able to come up with a name for it, and that having a name would be beneficial.