Quantcast
Channel: What does "del sys.modules[module]" actually do? - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Martijn Pieters for What does "del sys.modules[module]" actually do?

sys.modules is the Python-accessible reference to the canonical data structure for tracking what modules are imported. Removing a name from that dictionary means that any future attempts to import the...

View Article



What does "del sys.modules[module]" actually do?

As everyone knows, you can do del sys.modules[module] to delete an imported module. So I was thinking: how is this different from rewriting sys.modules? An interesting fact is, rewriting sys.modules...

View Article
Browsing latest articles
Browse All 2 View Live


Latest Images