Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用参数创建使用固定位置和速度的函数:
也许是这样的:
def fun(impSpd, golemSpd): imp_min, imp_max = impSpd golem_min, golem_max = golemSpd
没有很好的方法来“解包”或模式匹配函数定义中的参数。您可以将它们解压缩到函数体中。