Complex types for Python 3.8 and before



examples/python-types-at-pyweb-2025-01/complex_types_old.py
from typing import List, Dict, Tuple

things: List = ["snake", 42]
#things: List[str] = ["snake", 42]

numbers: List[int] = [23, 19, 42]

mapping: Dict[str, int] = {
        "Perl": 4,
        "Python": 6,
        "Rust": 4,
        "PHP": 3
}


info: Tuple[str, int, bool] = ("Python", 3, True)