|
|
|
|
|
by leetrout
1455 days ago
|
|
Yes to the principle. But typed dict is useful for more than just "the wire". 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. |
|