INNER CODE UNIT · Python

__await__

Xeron2000/openOii · backend/aiosqlite/__init__.py:134

    def __await__(self):
        return self._open().__await__()

    async def __aenter__(self) -> "Connection":
        return await self._open()

    async def __aexit__(self, exc_type, exc_val, exc_tb) -> None:
        await self.close()

    async def _open(self) -> "Connection":
        await asyncio.sleep(0)
        if self._conn is None:
            self._conn = self._connector()
        return self

    async def cursor(self, *args: Any, **kwargs: Any) -> Cursor:
        await asyncio.sleep(0)
        await self._open()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…