From: Victor Stinner Date: Sun, 12 Oct 2014 22:55:50 +0000 (+0200) Subject: asyncio: add missing @coroutine decorator X-Git-Tag: v3.4.3rc1~482 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ed8e3a987e89c2a9c197fc9e6d576defb4b3edab;p=thirdparty%2FPython%2Fcpython.git asyncio: add missing @coroutine decorator --- diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst index 1e6dc9463b32..348132a5b7b6 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()