基本上我已经创建了一个Python对象,我想调用它的一个函数,如下所示。你知道吗
public static dynamic ExecuteClassFunction(string filePath, OldInstance pythonObject, string functionName, dynamic[] arguments)
{
s_ScriptScope = s_PythonEngine.ExecuteFile(filePath);
return s_PythonEngine.Operations.InvokeMember(pythonObject, functionName, arguments);
}
但是,我得到错误“init()正好取1个参数(给定3个)”。为什么它要调用init(),尽管我之前已经初始化了对象?你知道吗
不要紧,我发现我在别处调用构造函数,并在不该调用的时候将值传递给它。你知道吗
相关问题 更多 >
编程相关推荐