NameError: name 'reload' is not defined
python, python-3.x
Solution
You probably wanted `importlib.reload()`.
from importlib import reload
In Python 2.x, this was a builtin, but in 3.x, it's in the `importlib` module.
Note that using `reload()` outside of the interpreter is generally unnecessary, what were you trying to do here?
Problem
I'm using python 3.2.2. When I write a simple program, I meet the problem. ``` >>> reload(recommendations) Traceback (most recent call last): File "<pyshell#6>", line 1, in <module> reload(recommendations) NameError: name 'reload' is not defined ``` How should I do it?