]> granicus.if.org Git - python/commitdiff
asyncio doc: cleanup Hello World examples
authorVictor Stinner <victor.stinner@gmail.com>
Sat, 11 Oct 2014 14:15:58 +0000 (16:15 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Sat, 11 Oct 2014 14:15:58 +0000 (16:15 +0200)
Doc/library/asyncio-eventloop.rst
Doc/library/asyncio-task.rst

index 8706b41ff4702cca96b981d791d47c679f38f37a..ed385120805cd2ebbfb448071c6a35835c21de3c 100644 (file)
@@ -633,13 +633,16 @@ Handle
       Cancel the call.
 
 
+Event loop examples
+===================
 
 .. _asyncio-hello-world-callback:
 
-Example: Hello World (callback)
--------------------------------
+Hello World with a callback
+---------------------------
 
-Print ``Hello World`` every two seconds, using a callback::
+Print ``"Hello World"`` every two seconds using a callback scheduled by the
+:meth:`BaseEventLoop.call_soon` method::
 
     import asyncio
 
@@ -656,7 +659,8 @@ Print ``Hello World`` every two seconds, using a callback::
 
 .. seealso::
 
-   :ref:`Hello World example using a coroutine <asyncio-hello-world-coroutine>`.
+   The :ref:`Hello World coroutine <asyncio-hello-world-coroutine>` example
+   uses a :ref:`coroutine <coroutine>`.
 
 
 Example: Set signal handlers for SIGINT and SIGTERM
index e7c316df9e9273b6a98db74bd9564b80c18c960a..8c4d790eace7fbeebb59ee95524188cf5535c944 100644 (file)
@@ -98,8 +98,9 @@ Print ``"Hello World"`` every two seconds using a coroutine::
 
 .. seealso::
 
-   :ref:`Hello World example using a callback <asyncio-hello-world-callback>`.
-
+   The :ref:`Hello World with a callback <asyncio-hello-world-callback>`
+   example uses a callback scheduled by the :meth:`BaseEventLoop.call_soon`
+   method.
 
 Example: Chain coroutines
 ^^^^^^^^^^^^^^^^^^^^^^^^^