You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
33 lines
490 B
Python
33 lines
490 B
Python
# Python 3.5+ async and await
|
|
async def await_test(asyncio):
|
|
reader, writer = await asyncio.open_connection(80)
|
|
await bar()
|
|
|
|
async def afor_test():
|
|
|
|
async for i in [1,2,3]:
|
|
x = i
|
|
|
|
|
|
async def afor_else_test():
|
|
|
|
async for i in [1,2,3]:
|
|
x = i
|
|
else:
|
|
z = 4
|
|
|
|
|
|
async def awith_test():
|
|
async with i:
|
|
print(i)
|
|
|
|
async def awith_as_test():
|
|
async with 1 as i:
|
|
print(i)
|
|
|
|
async def f(z):
|
|
await z
|
|
|
|
async def g(z):
|
|
return await z
|