30 Jan
2019
30 Jan
'19
7:35 p.m.
I think using reload should raise warnings, since it doesn't work, and the reload case shouldn't be the killer of this really good idea.
In Python2, reload is in __builtin__ module (and so available without import at the Python console). Since Python 3.4 this functionality is in the importlib module. https://docs.python.org/3.7/library/importlib.html#importlib.reload reload is a 44 line pure Python function. No need to use it if you don't want to. https://github.com/python/cpython/blob/3.7/Lib/importlib/__init__.py#L133-L1... I was writing this as Michael Foord's similar (but concise) post came in. -- Jonathan