Skip to content

Commit

Permalink
fix(docs): fix task mapping example (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Nov 13, 2024
1 parent 30a1a95 commit 910b702
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions a_sync/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ class TaskMapping(DefaultDict[K, "asyncio.Task[V]"], AsyncIterable[Tuple[K, V]])
... return await response.text()
...
>>> tasks = TaskMapping(fetch_data, name='url_fetcher', concurrency=5)
>>> tasks['example.com'] =
>>> tasks['python.org'] = 'https://www.python.org'
>>> tasks['example.com']
>>> tasks['python.org']
>>> async for key, result in tasks:
... print(f"Data for {key}: {result}")
...
Expand Down

0 comments on commit 910b702

Please sign in to comment.