From d2f2438ead7443312183b0c2de19ab622338470c Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 30 Apr 2016 17:57:51 +0300 Subject: [PATCH] async/await: Some fixes --- Differences.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Differences.md b/Differences.md index cabfd7c..223da10 100644 --- a/Differences.md +++ b/Differences.md @@ -21,10 +21,10 @@ 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` keywords are implemented with the following simplifications: there's no separate "coroutine" object type, `async def` just defines a generator function without requirement for "yield" or "yield from" to appear in function body. Usage of "yield" or "yield from" on `async def` function is not detected or banned. +1. `async def` keyword is implemented with the following simplifications: there's no separate "coroutine" object type, `async def` just defines a generator function without requirement for "yield" or "yield from" to appear in function body. Usage of "yield" or "yield from" in `async def` function is not detected or banned. 1. `async with` should be equivalent to [PEP492 description](https://www.python.org/dev/peps/pep-0492/#asynchronous-context-managers-and-async-with). 1. `async for` should be equivalent to [PEP492 description](https://www.python.org/dev/peps/pep-0492/#asynchronous-iterators-and-async-for). -1. There's no support for "Future-like objects" with `__await__` method. `await` can be used on coroutines and generators. It's also just a syntactic sugar for "yield from" and thus accepts iterables and iterators, which are not allowed in CPython. +1. There's no support for "Future-like objects" with `__await__` method. `await` can be used only on coroutines and generators (not "Future-like objects"). It's also just a syntactic sugar for "yield from" and thus accepts iterables and iterators, which are not allowed in CPython. ## 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.)