mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-34335: Use async/await syntax in documentation examples (GH-8674)
This commit is contained in:
parent
b221c93d4c
commit
d2ac400267
2 changed files with 2 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue