4 ms·
classes themselves are types, which is semantically valuable and also provides for a straightforward inheritance pattern. attributes on classes are easier to
by zzzeek 4y ago
classes themselves are types, which is semantically valuable and also provides for a straightforward inheritance pattern. attributes on classes are easier to type. There's pep-589 TypedDict but it's not very easy to use right now.