diff options
author | pohmelie <multisosnooley@gmail.com> | 2016-01-27 23:23:11 +0300 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-04-13 15:26:38 +0100 |
commit | 81ebba7e0236163b7594938201bf3a6b802ebfaa (patch) | |
tree | f75ae92c1dd879507e718d6234c8b007c4070686 /py/qstrdefs.h | |
parent | 959ed931a4d4079b4902f3d56e1696a2370e6c20 (diff) | |
download | micropython-81ebba7e0236163b7594938201bf3a6b802ebfaa.tar.gz micropython-81ebba7e0236163b7594938201bf3a6b802ebfaa.zip |
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`.
Diffstat (limited to 'py/qstrdefs.h')
-rw-r--r-- | py/qstrdefs.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/py/qstrdefs.h b/py/qstrdefs.h index da22a40b57..a3b68832c6 100644 --- a/py/qstrdefs.h +++ b/py/qstrdefs.h @@ -94,6 +94,14 @@ Q(__neg__) Q(__pos__) #endif +#if MICROPY_PY_ASYNC_AWAIT +Q(__aiter__) +Q(__anext__) +Q(__aenter__) +Q(__aexit__) +Q(StopAsyncIteration) +#endif + Q(micropython) Q(bytecode) Q(const) |