5 ms·
> But there are three more ways to do the same data structure Thanks, I hate it. There’s a lot I like about Python, but this is a major pain point. NamedTuple
by solarkraft 2y ago
> But there are three more ways to do the same data structure
Thanks, I hate it. There’s a lot I like about Python, but this is a major pain point.
NamedTuple, TypedDict, Dataclass, Record ... Remember the Zen of Python? „There should be one-- and preferably only one --obvious way to do it“ - it feels like Python has gone way overboard with ways to structure data.
In Javascript everything is an object, you can structurally type them with Typescript and I don’t feel like I’m missing much.