4 ms·
Agreed -- dataclasses over dicts. And for legacy code I try to move them to typed dictionaries. Pydantic is also helpful to enforce types on json. I've also
by rrauenza 1y ago
Agreed -- dataclasses over dicts. And for legacy code I try to move them to typed dictionaries.
Pydantic is also helpful to enforce types on json.
I've also stopped passing around argparse namespaces. I immediately push the argparse namespace into a pydantic class (although a dataclass could also be used.)