[issue41770] Import module doesn't updated
Steven D'Aprano
report at bugs.python.org
Sat Sep 12 00:14:28 EDT 2020
Steven D'Aprano <steve+python at pearwood.info> added the comment:
This is not a bug, it is working as designed. Importing takes the module from the cache. You can either delete the module from the cache:
del sys.modules['modulename']
import modulename # reloads from the module file
or possibly simpler, use reload:
importlib.reload(modulename)
----------
components: +Interpreter Core -Windows
nosy: +steven.daprano
resolution: -> not a bug
stage: -> resolved
status: open -> closed
type: resource usage -> behavior
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41770>
_______________________________________
More information about the Python-bugs-list
mailing list