Hi, I posted a patch recently, #441791, causing "import foo.bar" to set "sys.modules['foo'].bar = sys.modules['foo.bar']" even if an error is raised during the importing of bar. With this patch, import commands like "import foo.bar; reload(foo.bar)" work in a fashion more consistent with the way "import unpackaged_module; reload(unpackaged_module)" works. Thomas Wouters posted a reply saying that this has been discussed on python-dev before. I've searched the archives for the keywords "import.c", "import_submodule" (the function I modify,) and "package import" but didn't turn up anything relevant. Could someone point me at a thread which discusses this? This patch has proved very useful to me, as I tend to carry around a lot of data in long-running python process, and being able to reload submodules of a package has been very useful to me. It'd be nice if the patch got into python itself, so that I can retain my development habits without having to keep an eye on import.c. :) Alex.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4