Without diving into the unloading pit, the endless problems with -r on non-Unix boxes would go away if a module that failed to import didn't leave behind a damaged module object in sys.modules ("damaged" == it may not fulfill some or any of the module's contracts, and it's impossible to guess which ones it won't, or to guess how the unfufilled ones may fail). I'm tempted to add a pile of Windows-specific modules that import each other in incestuous ways, so everyone can enjoy this chronic pain <wink>. "A fix" seems to amount to treating import M as if it were try: import M except: if M in sys.modules: del sys.modules[M] raise How would that hurt?
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