python 函数参数列表中的字符串
A string in a python function's parameter list
在this project中遇到如下代码
def update_prio_and_stats(item: ("ActorHandle", dict, int)):
我知道这指定传递给update_prio_and_stats
的参数应该是("ActorHandle", dict, int)
的元组。 dict
和 int
很容易理解——它们是内置类型。但我对字符串 "ActorHandle"
感到困惑,我猜它应该指定一个 ray actor。效果如何?
“ActorHandle”是对 class 在该项目中 cpp/include/ray/api/actor_handle.h 中创建的名称的引用(自定义数据类型)
在this project中遇到如下代码
def update_prio_and_stats(item: ("ActorHandle", dict, int)):
我知道这指定传递给update_prio_and_stats
的参数应该是("ActorHandle", dict, int)
的元组。 dict
和 int
很容易理解——它们是内置类型。但我对字符串 "ActorHandle"
感到困惑,我猜它应该指定一个 ray actor。效果如何?
“ActorHandle”是对 class 在该项目中 cpp/include/ray/api/actor_handle.h 中创建的名称的引用(自定义数据类型)