Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/faif/python-patterns
/ __enter__
Method
__enter__
patterns/creational/pool.py:40–43 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
38
self.item = self._queue.get()
if
auto_get
else
None
39
40
def
__enter__(self) -> str:
41
if
self.item is None:
42
self.item = self._queue.get()
43
return
self.item
44
45
def
__exit__(
46
self,
Callers
nothing calls this directly
Calls
1
get
Method · 0.45
Tested by
no test coverage detected