diff options
author | Mikhail Terekhov <termim@gmail.com> | 2018-08-07 20:29:06 (GMT) |
---|---|---|
committer | Mariatta <Mariatta@users.noreply.github.com> | 2018-08-07 20:29:06 (GMT) |
commit | d2ac400267940f35d731d66c2dafafe099d770d9 (patch) | |
tree | 65e1831f1fc7b89d2f51fce57a98c804c470792f /Doc/library/asyncio-stream.rst | |
parent | b221c93d4cf8fe9ecec429b08612abcc211a39a6 (diff) | |
download | cpython-d2ac400267940f35d731d66c2dafafe099d770d9.zip cpython-d2ac400267940f35d731d66c2dafafe099d770d9.tar.gz cpython-d2ac400267940f35d731d66c2dafafe099d770d9.tar.bz2 |
bpo-34335: Use async/await syntax in documentation examples (GH-8674)
Diffstat (limited to 'Doc/library/asyncio-stream.rst')
-rw-r--r-- | Doc/library/asyncio-stream.rst | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst index 8f94ba7..f662e72 100644 --- a/Doc/library/asyncio-stream.rst +++ b/Doc/library/asyncio-stream.rst @@ -431,8 +431,7 @@ Simple example querying HTTP headers of the URL passed on the command line:: import urllib.parse import sys - @asyncio.coroutine - def print_http_headers(url): + async def print_http_headers(url): url = urllib.parse.urlsplit(url) if url.scheme == 'https': connect = asyncio.open_connection(url.hostname, 443, ssl=True) |