mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
py: add async/await/async for/async with syntax
They are sugar for marking function as generator, "yield from" and pep492 python "semantically equivalents" respectively. @dpgeorge was the original author of this patch, but @pohmelie made changes to implement `async for` and `async with`.
This commit is contained in:
@@ -197,6 +197,9 @@ MP_DEFINE_EXCEPTION(KeyboardInterrupt, BaseException)
|
||||
MP_DEFINE_EXCEPTION(GeneratorExit, BaseException)
|
||||
MP_DEFINE_EXCEPTION(Exception, BaseException)
|
||||
MP_DEFINE_EXCEPTION_BASE(Exception)
|
||||
#if MICROPY_PY_ASYNC_AWAIT
|
||||
MP_DEFINE_EXCEPTION(StopAsyncIteration, Exception)
|
||||
#endif
|
||||
MP_DEFINE_EXCEPTION(StopIteration, Exception)
|
||||
MP_DEFINE_EXCEPTION(ArithmeticError, Exception)
|
||||
MP_DEFINE_EXCEPTION_BASE(ArithmeticError)
|
||||
|
||||
Reference in New Issue
Block a user