def a_fun():
"""
this is a comment
name:a_fun
param:
body:
"""
pass
print(a_fun.__doc__,end='\n--------')
print(print.__doc__)
def anno_fun(hha:str)->str:
print(anno_fun.__annotations__)
return "ok"
print(anno_fun("hahha"))
python函数文档属性:__doc__,__annotations__
最新推荐文章于 2024-08-26 18:56:03 发布