Repository URL to install this package:
Version:
8.1.0 ▾
|
__all__ = ("aclosing",)
class aclosing:
"""Backport of `contextlib.aclosing` from Python 3.10."""
def __init__(self, thing):
self.thing = thing
async def __aenter__(self):
return self.thing
async def __aexit__(self, *exc_info):
await self.thing.aclose()