summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/library/asyncio.rst13
1 files changed, 13 insertions, 0 deletions
diff --git a/Doc/library/asyncio.rst b/Doc/library/asyncio.rst
index 7895826..73b0e63 100644
--- a/Doc/library/asyncio.rst
+++ b/Doc/library/asyncio.rst
@@ -6,6 +6,19 @@
--------------
+.. sidebar:: Hello World!
+
+ .. code-block:: python
+
+ import asyncio
+
+ async def main():
+ print('Hello ...')
+ await asyncio.sleep(1)
+ print('... World!')
+
+ asyncio.run(main())
+
asyncio is a library to write **concurrent** code using
**async/await** syntax.