pep-0492: AsyncFuntionDef ast node; 100% backwards compatible
This commit is contained in:
parent
c170883653
commit
268a2226aa
|
@ -567,10 +567,7 @@ An example of having "async def" and "async" attribute in one piece of code::
|
|||
Backwards Compatibility
|
||||
-----------------------
|
||||
|
||||
The only backwards incompatible change is an extra argument ``is_async`` to
|
||||
``FunctionDef`` AST node. But since it is a documented fact that the structure
|
||||
of AST nodes is an implementation detail and subject to change, this should not
|
||||
be considered a serious issue.
|
||||
This proposal preserves 100% backwards compatibility.
|
||||
|
||||
|
||||
Grammar Updates
|
||||
|
@ -922,8 +919,7 @@ List of high-level changes and new protocols
|
|||
protocol with ``__aiter__``, ``__aexit__`` and new built-in exception
|
||||
``StopAsyncIteration``.
|
||||
|
||||
5. New AST nodes: ``AsyncFor``, ``AsyncWith``, ``Await``; ``FunctionDef`` AST
|
||||
node got a new argument ``is_async``.
|
||||
5. New AST nodes: ``AsyncFunctionDef``, ``AsyncFor``, ``AsyncWith``, ``Await``.
|
||||
|
||||
6. New functions: ``sys.set_coroutine_wrapper(callback)`` and
|
||||
``types.async_def(gen)``.
|
||||
|
|
Loading…
Reference in New Issue