Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Dataclasses are relatively recent addition to the language: dicts were the most reasonable way to do it in the past, especially before type checking.

Under the hood, classes are also dict lookups, so really, this is mostly about adding type checking (unless you are also using slots).



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

Search: