Steven D'Aprano <[email protected]> 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 <[email protected]>
<https://bugs.python.org/issue41770>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com