2024-10-04 05:30:06 发布
网友
我要求在函数的参数中包含*。 但它的语法错误如下
>>> xr.bngConfig(get_topo*titan_file=self.inputs['titan_file']) File "<stdin>", line 1 SyntaxError: keyword can't be an expression
我无法更改这里的参数,因为bngConfig正在调用一个tcl函数,该函数的-get_topo*titan_file是我无法更改的参数
-get_topo*titan_file
python调用中如何包含*呢
The hard way.
xr.bngConfig(**{'get_topo*titan_file': self.inputs['titan_file']})
The hard way.
相关问题 更多 >
编程相关推荐