This is a theoretical or experimental question. I am searching for generality here. "Does a method apply to every possible appliable object?"
I recently asked about how to reload builtin-modules. Here is the result so far : link
As far as I know, we need to delete sys.modules['package_name']
and package_name
.
Does this method apply to all the other built-in library?
Well maybe. But I tried to delete sys
and reload it, I failed. It seems that for import
ing we need sys
package because import
searchs sys.modules
.
So my question is how can i reload the built-in package sys
? I wont accept any answer like "Don't do it". I know that I won't have a chance to use this or it's much faster just to restart python but I might understand more about python searching for this answer, so is there any chance to reloading sys
?