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

Method athrow

Lib/_collections_abc.py:250–260  ·  view source on GitHub ↗

Raise an exception in the asynchronous generator. Return next yielded value or raise StopAsyncIteration.

(self, typ, val=None, tb=None)

Source from the content-addressed store, hash-verified

248
249 @abstractmethod
250 async def athrow(self, typ, val=None, tb=None):
251 """Raise an exception in the asynchronous generator.
252 Return next yielded value or raise StopAsyncIteration.
253 """
254 if val is None:
255 if tb is None:
256 raise typ
257 val = typ()
258 if tb is not None:
259 val = val.with_traceback(tb)
260 raise val
261
262 async def aclose(self):
263 """Raise GeneratorExit inside coroutine.

Callers 2

acloseMethod · 0.95
__aexit__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected