Python 3.5+ type annotations

2018-09-30  本文已影响0人  import_hello
# Python 3.5+ supports 'type annotations' that can be
# used with tools like Mypy to write statically typed Python:

def my_add(a: int, b: int) -> int:
    return a + b
上一篇 下一篇

猜你喜欢

热点阅读