Type system construct for a possibly missing key-value pair is NotRequired. mypy and Pyright previously didn’t error in the correct handling of this with try/except, but removed that at some point.
While I brought this up before as a separate issue, I think if we’re expanding the places keys can optionally be present, it’s relevant to this pep that this is addressed