Python3 具有注释功能。我应该使用它来代替文档字符串吗?IE。什么是正确的方法:
def func(points: [{'x': int, 'y': int}]): -> int
pass
对比
def func(points):
''' Take a list of dicts, dict present a point, and contain keys:
'x' - int, x position
'y' - int, y position
Return int
'''
pass