I want to type the parameter of a method to be one of a finite set of valid values. So basically, I would like to have the typing equivalent of the following minima
typing
This feature has just been introduced in Python 3.8: typing.Literal. See PEP 586 for details.
Example:
def typed_method(parameter: Literal["value", "other value"]): pass