Hacker News new | ask | show | jobs
by ash 2306 days ago
PEP 604 (draft) proposes this:

  def f(list: List[int | str], param: int | None) -> float | str:
      pass

  f([1, "abc"], None)
https://www.python.org/dev/peps/pep-0604/