Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Show HN: FastOpenAPI – automated docs for many Python frameworks. Parent comment
Two big deals of Trio and AnyIO are channels (similar to Go's channels), the ability to return data from starting a task in a nursery/task group:
async def my_consumer(task_status = anyio.TASK_STATUS_IGNORED): tx, rx = anyio.create_memory_object_stream() task_status.started(tx) async for message in rx: ... async def my_producer(tx): await tx.send("hello") await tx.send("world") await tx.aclose() async def main(): async with anyio.create_task_group() as tg: tx = await tg.start(my_consumer) tg.start_soon(my_producer, tx)
There are no comments on this comment yet.
Two big deals of Trio and AnyIO are channels (similar to Go's channels), the ability to return data from starting a task in a nursery/task group: