2024年6月18日

python函数声明(参数/返回值注释)和三个双引号用法

摘要: 1 # python的"""三个双引号两种用法:(1)多行注释 (2)定义多行字符串 2 def f1(ham: 42, eggs: int = 'spam') -> "Nothing to see here": 3 print("函数注释", f1.__annotations__) # 函数注释 阅读全文

posted @ 2024-06-18 15:24 gogoy 阅读(17) 评论(0) 推荐(0) 编辑

导航