摘要: 看看def函数右侧有->和没有的区别 def f(agent:str) -> str: print("Annotations:", f.__annotations__) return agent print(f('weixin')) print(f(1)) # 结果: # Annotations: 阅读全文
posted @ 2021-09-13 18:51 lucky_tomato 阅读(416) 评论(0) 推荐(0) 编辑