Open tarohi24 opened 3 years ago
See https://www.python.org/dev/peps/pep-0586/#literals-enums-and-forward-references for detail information.
A Literal type indicates the specific values it accepts. For example, argument mode in Python's open() can be expressed by the following type notation:
Literal
mode
open()
mode: Literal["r", "w", "a", "x", "r+", "w+", "a+", "x+"]
See https://www.python.org/dev/peps/pep-0586/#literals-enums-and-forward-references for detail information.
A
Literal
type indicates the specific values it accepts. For example, argumentmode
in Python'sopen()
can be expressed by the following type notation: