__annotations__
annotations
和 __annotations__
annotations -
__annotations__
- 保存了所有类型注释的字典
def test(p1:int) -> int:
return p1
print(test.__annotations__)
annotations
和 __annotations__
annotations -
__annotations__
- 保存了所有类型注释的字典
def test(p1:int) -> int:
return p1
print(test.__annotations__)