MCPcopy Index your code
hub / github.com/python/cpython / aclose

Method aclose

Lib/_collections_abc.py:262–270  ·  view source on GitHub ↗

Raise GeneratorExit inside coroutine.

(self)

Source from the content-addressed store, hash-verified

260 raise val
261
262 async def aclose(self):
263 """Raise GeneratorExit inside coroutine.
264 """
265 try:
266 await self.athrow(GeneratorExit)
267 except (GeneratorExit, StopAsyncIteration):
268 pass
269 else:
270 raise RuntimeError("asynchronous generator ignored GeneratorExit")
271
272 @classmethod
273 def __subclasshook__(cls, C):

Callers

nothing calls this directly

Calls 1

athrowMethod · 0.95

Tested by

no test coverage detected