MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / __aenter__

Method __aenter__

example_code/item_078.py:137–140  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

135
136 print("Example 7")
137 async def __aenter__(self):
138 loop = asyncio.get_event_loop()
139 await loop.run_in_executor(None, self.start)
140 return self
141
142 async def __aexit__(self, *_):
143 await self.stop()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected