函数注解

>>> def joi_n(x:str, y:str) -> str:
return x+y
... ...
>>> help(joi_n)
Help on function joi_n in module __main__:

joi_n(x:str, y:str) -> str

>>> joi_n('ab', 'cd')
'abcd'
>>>

posted @ 2018-03-23 17:28  edwardgui  阅读(81)  评论(0编辑  收藏  举报