From 9cc180f1352f75da5de58e8125fabed91a273a73 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Fri, 9 Oct 2015 20:10:51 +0300 Subject: [PATCH] Fix typo --- pep-0492.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pep-0492.txt b/pep-0492.txt index 76a66d25e..2d5c98804 100644 --- a/pep-0492.txt +++ b/pep-0492.txt @@ -125,7 +125,7 @@ Key properties of *coroutines*: * Internally, two new code object flags were introduced: - ``CO_COROUTINE`` is used to mark *native coroutines* - (defined with new syntax.) + (defined with new syntax). - ``CO_ITERABLE_COROUTINE`` is used to make *generator-based coroutines* compatible with *native coroutines* (set by @@ -139,7 +139,7 @@ Key properties of *coroutines*: such behavior requires a future import (see PEP 479). * When a *coroutine* is garbage collected, a ``RuntimeWarning`` is - raised if it was never awaited on (see also `Debugging Features`_.) + raised if it was never awaited on (see also `Debugging Features`_). * See also `Coroutine objects`_ section. @@ -199,7 +199,7 @@ can be one of: internally, coroutines are a special kind of generators, every ``await`` is suspended by a ``yield`` somewhere down the chain of ``await`` calls (please refer to PEP 3156 for a detailed - explanation.) + explanation). To enable this behavior for coroutines, a new magic method called ``__await__`` is added. In asyncio, for instance, to enable *Future* @@ -222,7 +222,7 @@ can be one of: It is a ``SyntaxError`` to use ``await`` outside of an ``async def`` function (like it is a ``SyntaxError`` to use ``yield`` outside of -``def`` function.) +``def`` function). It is a ``TypeError`` to pass anything other than an *awaitable* object to an ``await`` expression. @@ -918,7 +918,7 @@ There is no use of ``await`` names in CPython. ``async`` is mostly used by asyncio. We are addressing this by renaming ``async()`` function to ``ensure_future()`` (see `asyncio`_ -section for details.) +section for details). Another use of ``async`` keyword is in ``Lib/xml/dom/xmlbuilder.py``, to define an ``async = False`` attribute for ``DocumentLS`` class. @@ -970,7 +970,7 @@ PEP 3152 by Gregory Ewing proposes a different mechanism for coroutines 2. A new keyword ``cocall`` to call a *cofunction*. Can only be used inside a *cofunction*. Maps to ``await`` in this proposal (with - some differences, see below.) + some differences, see below). 3. It is not possible to call a *cofunction* without a ``cocall`` keyword.