Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ __enter__
Method
__enter__
Lib/test/test_importlib/util.py:255–258 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
253
return
self.modules[name]
254
255
def
__enter__(self):
256
self._uncache = uncache(*self.modules.keys())
257
self._uncache.__enter__()
258
return
self
259
260
def
__exit__(self, *exc_info):
261
self._uncache.__exit__(None, None, None)
Callers
2
create_modules
Function · 0.45
test_entered_path_does_not_keep_open
Method · 0.45
Calls
2
uncache
Function · 0.85
keys
Method · 0.45
Tested by
1
test_entered_path_does_not_keep_open
Method · 0.36