Comment Comment by miohtama Reasons to use dataclass(slots=True) instead of TypedDict- Faster attribute access: your code is faster- Slotted classes take less RAM, less L1 cache pressure, your code is faster- Wrist friendly to with .foobar instead of ["foobar"]- Runtime error if you misspell an attribute name parent miohtama 2 years ago
- Faster attribute access: your code is faster
- Slotted classes take less RAM, less L1 cache pressure, your code is faster
- Wrist friendly to with .foobar instead of ["foobar"]
- Runtime error if you misspell an attribute name