There are places where you just dont need the overhead of a class. Yes slotted classes make this much cheaper but so do named tuples.
If the behavior of a thing is to map values then it should stay a dict.
If the behavior is a bag of attributes then yes pick something better.
There are places where you just dont need the overhead of a class. Yes slotted classes make this much cheaper but so do named tuples.
If the behavior of a thing is to map values then it should stay a dict.
If the behavior is a bag of attributes then yes pick something better.