In Python 3.9 we can use type hinting in a lowercase built-in fashion (without having to import type signatures from the typing
module) as described here:
def greet_all(names: list[str]) -> None:
for name in names:
print("Hello", name)
I like very much this idea and I would like to know if it is possible to use this way of type hinting but in previous versions of python, such as Python 3.7, where we have write type hinting like this:
from typing import List
def greet_all(names: List[str]) -> None:
for name in names:
print("Hello", name)