[Python] python functions defined in behind that arrow is doing

If that another example of FIG.

def add(x:int, y:int) -> int:
    return x + y

answer:

Is a comment. Front: int too. see:

https://python3-cookbook.readthedocs.io/zh_CN/latest/c07/p03_attach_informatinal_matadata_to_function_arguments.html

Guess you like

Origin www.cnblogs.com/hugetong/p/12632856.html