23 Dec
2022
23 Dec
'22
2:40 p.m.
I don't like this solution for this reason: in the example, Coefficients is not a subtype of Dict[str, float] even though it is subclassing it. I don't have strong feelings against solving this problem, but I think this particular solution would be problematic, and I do agree with Guido's comment above:
I don't think we should try to add features to TypedDict to encourage its use for new coding styles, even though those styles are popular in other languages.
And in extension of that, I personally think boto3 should be encouraged to transition away from using dicts.