在python2中,reload()是内置函数,能够直接使用。 但是在python3中,直接使用reload()会报错,需要从imp中导入。 用法为 >>>from imp import reload >>>reload(xyz)