我将一些辅助函数放在一个单独的文件helper.py中:
def funct1(data1):
# doing something
return data1
def funct2(data2):
temp = funct1(data2)
# doing something
return data2
我在另一个文件中导入了这个helper.py,但收到错误"global name funct1 is not defined"
import helper as hp
hp.funct2(somedata)