pep-0492: AsyncFuntionDef ast node; 100% backwards compatible

This commit is contained in:
Yury Selivanov 2015-04-19 14:15:49 -04:00
parent c170883653
commit 268a2226aa
1 changed files with 2 additions and 6 deletions

View File

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