3 ms·
There are some other ways of expressing names for types, once you start using typing. There are typevars, enums and using the "|" to separate options, there are
by zelphirkalt 2y ago
There are some other ways of expressing names for types, once you start using typing. There are typevars, enums and using the "|" to separate options, there are TypedDict, NamedTuple, Union, Literal, Optional, and probably more. Not everything needs to be a dataclass.