diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-10-12 22:55:50 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-10-12 22:55:50 (GMT) |
commit | ed8e3a987e89c2a9c197fc9e6d576defb4b3edab (patch) | |
tree | 46dc8bc8caa68d9f8c73608fc53708689147b33c | |
parent | ab1c85307948219ecf15608b7f7aad41fb8c8670 (diff) | |
download | cpython-ed8e3a987e89c2a9c197fc9e6d576defb4b3edab.zip cpython-ed8e3a987e89c2a9c197fc9e6d576defb4b3edab.tar.gz cpython-ed8e3a987e89c2a9c197fc9e6d576defb4b3edab.tar.bz2 |
asyncio: add missing @coroutine decorator
-rw-r--r-- | Doc/library/asyncio-stream.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst index 1e6dc94..348132a 100644 --- a/Doc/library/asyncio-stream.rst +++ b/Doc/library/asyncio-stream.rst @@ -250,6 +250,7 @@ TCP echo client using the :func:`asyncio.open_connection` function:: import asyncio + @asyncio.coroutine def tcp_echo_client(message, loop): reader, writer = yield from asyncio.open_connection('127.0.0.1', 8888, loop=loop) @@ -379,6 +380,7 @@ Coroutine waiting until a socket receives data using the except ImportError: from asyncio.windows_utils import socketpair + @asyncio.coroutine def wait_for_data(loop): # Create a pair of connected sockets rsock, wsock = socketpair() |