2025-09-10:仓库迁移
This commit is contained in:
5
7.函数/3.将元数据信息附加到函数参数上.py
Normal file
5
7.函数/3.将元数据信息附加到函数参数上.py
Normal file
@@ -0,0 +1,5 @@
|
||||
# 有时候我们会想要将函数参数加上类型提示来方便其他人快速熟悉函数,那么可以这样做:
|
||||
|
||||
def test_function(x:int, y:int)->int:
|
||||
x = x**2
|
||||
return x+y
|
Reference in New Issue
Block a user