ref: PEP-0492 # need Python >= 3.5 >>> class AsyncCtxMgr: ... async def __aenter__(self): ... await asyncio.sleep(3) ... print("__anter__") ... return self ...
確定! 回上一頁