2011-12-02 44 views
1

我要去throgh Segaran的编程集体智慧使用Windows版本的PyPy。PyPy重新加载(...)错误

作者正在逐步构建this的例子。首先加载字典中:

from recommendations import critics 

recommendations.py然后通过添加新的功能改进。然后,读者应该重新装入模块:

reload(recommendations) 

取而代之的成功重装我得到这个错误,而不是:

>>>> reload(recommendations) 
Traceback (most recent call last): 
File "<console>", line 1, in <module> 
NameError: global name 'recommendations' is not defined 

难道我做错了什么?

回答

2

全球不在那里。您需要导入建议才能正常工作。

+0

谢谢。我做了'输入建议',它工作。 – geca