Python 3.x supports (optional) function annotations:
def add_ints(x:int, y:int) -> int : return x+y
I sometimes encounter problems as to
The typing module defines the Generator type, which you can use like:
Generator[yield_type, send_type, return_type]
See also PEP 0484.