1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
from __future__ import annotations from typing import overload myint = int def sum(x: myint, y: myint) -> myint: """docstring""" return x + y @overload def mult(x: myint, y: myint) -> myint: ... @overload def mult(x: float, y: float) -> float: ... def mult(x, y): """docstring""" return x, y