【发布时间】:2010-12-26 03:05:07
【问题描述】:
我正在使用 Eclipse 中的交互式控制台,并且重新加载不会在我的代码中显示更新的函数。我的代码是:
def func1():
return 1
def func2():
return 2
但是当我把它改成
def afunc1():
return 1
def func2():
return 2
def func1():
return 3
然后运行 imp.reload(TestMod),我得到了一个 'module' object has no attribute 'afunc1()'。
此外,有时会加载函数,有时则不会。
【问题讨论】:
标签: python eclipse import pydev reload