5 Feb
2022
5 Feb
'22
10:30 p.m.
Why do we have Literal type in the typing module? I sure can use them as types to indicate to the user "these are your only options”?
On 6 Feb 2022, at 2:18 AM, Steven D'Aprano <steve@pearwood.info> wrote:
he bottom line here is that we cannot use literals as types because they aren't types, they are values, and the semantics of operations on types and operations on values are different.