问题:我在文件夹中有一个包含类和一些函数的脚本(带有 __ init __ .py)。在根文件夹中,我有一个main.py脚本。
在主脚本中,我使用模型调用了模块:
import folder.script
而且,我用模型调用了模块:
folder.script.class.function()
'class' 是用作模块的脚本类。'function' 是相对于类的函数。
但是,我收到一个输出错误:
TypeError: unbound method function() must be called with class instance as first argument
(一无所获)
错误在哪里?