Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d2ac4002
Commit
d2ac4002
authored
Aug 07, 2018
by
Mikhail Terekhov
Committed by
Mariatta
Aug 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-34335: Use async/await syntax in documentation examples (GH-8674)
parent
b221c93d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
Doc/library/asyncio-stream.rst
Doc/library/asyncio-stream.rst
+1
-2
Doc/library/asyncio-subprocess.rst
Doc/library/asyncio-subprocess.rst
+1
-2
No files found.
Doc/library/asyncio-stream.rst
View file @
d2ac4002
...
...
@@ -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)
...
...
Doc/library/asyncio-subprocess.rst
View file @
d2ac4002
...
...
@@ -392,8 +392,7 @@ function::
import asyncio.subprocess
import sys
@asyncio.coroutine
def get_date():
async def get_date():
code = 'import datetime; print(datetime.datetime.now())'
# Create the subprocess, redirect the standard output into a pipe
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment