Both classes have several functions to create new instances (__init__(), class methods, and test fixtures.
Every time we add or change a kwarg, we have to update all of these sites, and often one or more are forgotten, resulting in the different initialization methods being out of sync.
Proposal
Now that TypedDict supports extra items, can we leverage that to define and concatenate the kwargs?
Both classes have several functions to create new instances (
__init__(), class methods, and test fixtures.Every time we add or change a kwarg, we have to update all of these sites, and often one or more are forgotten, resulting in the different initialization methods being out of sync.
Proposal
Now that
TypedDictsupports extra items, can we leverage that to define and concatenate the kwargs?