3 ms·
Imported modules are compiled to bytecode and frozen on import, so changing the code in-place won't change what actually get run when the code is called unless
by nonameiguess 6y ago
Imported modules are compiled to bytecode and frozen on import, so changing the code in-place won't change what actually get run when the code is called unless you clear the bytecode cache and re-import.
importlib provide a reload method for this purpose: https://docs.python.org/3.8/library/importlib.html#importlib.reload https://docs.python.org/3.8/library/importlib.html#importlib...
- dfilppi 6y agoInteresting. I've done it with no issues on both 27 and 36. Just edit the code directly in site-packages.