[Python-checkins] cpython (3.4): asyncio doc: cleanup Hello World examples
victor.stinner
python-checkins at python.org
Sat Oct 11 16:17:31 CEST 2014
https://hg.python.org/cpython/rev/3d4a7c46845f
changeset: 92958:3d4a7c46845f
branch: 3.4
user: Victor Stinner <victor.stinner at gmail.com>
date: Sat Oct 11 16:15:58 2014 +0200
summary:
asyncio doc: cleanup Hello World examples
files:
Doc/library/asyncio-eventloop.rst | 12 ++++++++----
Doc/library/asyncio-task.rst | 5 +++--
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -633,13 +633,16 @@
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 @@
.. 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
diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
--- a/Doc/library/asyncio-task.rst
+++ b/Doc/library/asyncio-task.rst
@@ -98,8 +98,9 @@
.. 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
^^^^^^^^^^^^^^^^^^^^^^^^^
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list