3 ms·
Even without NotRequired, you've been able to have some-keys-optional-and-some-keys-required for a long time by putting the required keys in one TypedDict, then
by meatmanek 5y ago
Even without NotRequired, you've been able to have some-keys-optional-and-some-keys-required for a long time by putting the required keys in one TypedDict, then adding the optional keys in a subclass with total=False: https://mypy.readthedocs.io/en/stable/more_types.html#mixing-required-and-non-required-items https://mypy.readthedocs.io/en/stable/more_types.html#mixing...
It's not exactly elegant (hence PEP655), but it works just fine.