From 346fa418075b2ca9bb4f3568ebf39bb616e798ba Mon Sep 17 00:00:00 2001 From: pohmelie Date: Sat, 30 Apr 2016 16:59:23 +0400 Subject: [PATCH] async syntax description --- Differences.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Differences.md b/Differences.md index 35ccc16..d51c6f1 100644 --- a/Differences.md +++ b/Differences.md @@ -21,6 +21,13 @@ Some features don't cater for constrained systems, and at the same time are not 1. Object finalization (``__del__()`` method) is supported for builtin types, but not yet user classes. This is tracked by [#245](//github.com/micropython/micropython/issues/245). 1. Subclassing of builtin types is partially implemented, but there may be various differences and compatibility issues with CPython. [#401](//github.com/micropython/micropython/issues/401) 1. Buffered I/O streams (io.TextIOWrapper and superclasses) are not supported. +1. `async def`/`await`/`async with`/`async for` is just syntax sugar for mark function as generator/`yield from` with right operator priorities (as [pep492](https://www.python.org/dev/peps/pep-0492/) describes)/[semantically equivalent](https://www.python.org/dev/peps/pep-0492/#new-syntax)/[semantically equivalent](https://www.python.org/dev/peps/pep-0492/#id10) respectivly. + + Behaviour: + * Do not forbid `yield` and `yield from` from `async def`. + * No implicit call to `__await__`. + * No awaitable objects. + * No coroutine type. ## Known Issues Known issues are essentially bugs, misfeatures, and omissions considered such, and scheduled to be fixed. So, ideally any entry here should be accompanied by bug ticket reference. But note that these known issues will have different priorities, especially within wider development process. So if you are actually affected by some issue, please add details of your case to the ticket (or open it if does not yet exist) to help planning. Submitting patches is even more productive. (Please note that the list of not implemented modules/classes include only those which are considered very important to implement; per the above, MicroPython does not provide full standard library in general.)