You've already forked Core2forAWS-MicroPython
mirror of
https://github.com/m5stack/Core2forAWS-MicroPython.git
synced 2026-05-20 10:30:31 -07:00
17 lines
229 B
Python
17 lines
229 B
Python
# 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')
|