📜  python 类型提示 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:06.588000             🧑  作者: Mango

代码示例6
def no_type_hint(arg):
  print(arg) # arg can be anything
  
def with_type_hint(arg: str):
  print(arg) # arg must be a string or a subtype of string