3 ms·
That response is bad python though, I can't think of why you'd ever want a dict with Literal typed keys. Either use a TypedDict if you want the keys to be in a
by mpeg 2y ago
That response is bad python though, I can't think of why you'd ever want a dict with Literal typed keys.
Either use a TypedDict if you want the keys to be in a specific set, or, in your case since both the keys and the values are static you should really be using an Enum