Hacker News new | past | comments | ask | show | jobs | submit login

In python nowadays you use data classes for that. Essentially nice with the frozen attribute. Before that there were named tuples - still useful to subclass instead of frozen data classes, as long as you don't need inheritence or any of the advanced data class field attributes.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: