You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
229 B
17 lines
229 B
8 years ago
|
# test async def
|
||
|
|
||
|
def dec(f):
|
||
|
print('decorator')
|
||
|
return f
|
||
|
|
||
|
# test definition with a decorator
|
||
|
@dec
|
||
|
async def foo():
|
||
|
print('foo')
|
||
|
|
||
|
coro = foo()
|
||
|
try:
|
||
|
coro.send(None)
|
||
|
except StopIteration:
|
||
|
print('StopIteration')
|