Sep 23, 2022
I use dataclasses when I want to quickly write a class without having to write an __init__ function. As for using type() to create a class, I don't usually use it (there's not a lot of need to!)
Theoretically, we can use type() to dynamically create classes (check out Python metaclasses) but we very seldom need it in a real world context (at least in my experience)