async def fetch(self, url: str, keys: object, repeat: int) -> (int, object):
dosomething()
return None
在看别人的程序的时候发现了这样的语句,查了不少地方没找到关于“->”的说明。
找到比较相似的是箭头函数,但是样子都不一样。
请问这是什么符号?或者我该去哪里查?
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
Function annotations ?
"Python 3 provides syntax to attach metadata to the parameters of a function declaration
and its return value."
只是提示该函数 输入参数 和 返回值 的
数据类型方便程序员阅读代码的。
这个是。。。提示返回值类型的?