async syntax description

pohmelie 2016-04-30 16:59:23 +04:00
parent 2206869b0a
commit 346fa41807
1 changed files with 7 additions and 0 deletions

@ -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.)