from collections.abc import Coroutineclass _ContextManager(Coroutine):__slots__ = ('_coro', '_obj')def __init__(self, coro):self._coro = coroself._obj = Nonedef send(self, arg):return self._coro.send(arg) # pragma: no coverdef throw(self, arg):return self._coro.throw(arg) # pragma: no coverdef close(self):return self._coro.close() # pragma: no cover@propertydef gi_frame(self):return self._coro.gi_frame # pragma: no cover@propertydef gi_running(self):return self._coro.gi_running # pragma: no cover@propertydef gi_code(self):return self._coro.gi_code # pragma: no coverdef __next__(self):return self.send(None) # pragma: no coverdef __await__(self):return self._coro.__await__()async def __aenter__(self):self._obj = await self._cororeturn await self._obj.__aenter__()async def __aexit__(self, exc_type, exc, tb):await self._obj.__aexit__(exc_type, exc, tb)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。