Skip to content

Instantly share code, notes, and snippets.

import trio
from typing import AsyncIterator, Awaitable, Callable, Coroutine, Optional, TypeVar
A = TypeVar("A")
B = TypeVar("B")
async def yield_with_delay(val, delay):
for i in range(5):
await trio.sleep(delay)