def hanshuzhujie(a:str,b: str ='m')->str:
print(hanshuzhujie.__annotations__)
return a+b
hanshuzhujie('qqq')
运营结果
E:\Python\Python38\python.exe D:/pythonprojects/python-auto-test/test/hanshuzhujie.py
{'a': <class 'str'>, 'b': <class 'str'>, 'return': <class 'str'>}
Process finished with exit code 0