|
|
|
|
|
by throwaway894345
1455 days ago
|
|
This is one of the things I appreciate about languages like Go and Rust (I'm sure there are others as well). If the data is static, use a struct. If the data is dynamic, use a map/HashMap. No need to worry about TypedDict vs classes vs DataClasses vs etc, and no one uses HashMap for static data (they could, but virtually no one in those communities is such a glutton for punishment). From Zen of Python: > There should be one--and preferably only one--obvious way to do it |
|