[Python-checkins] peps: pep-0492: Add invalid syntax examples; fix typo.

yury.selivanov python-checkins at python.org
Wed Apr 29 18:09:23 CEST 2015


https://hg.python.org/peps/rev/d048458307b7
changeset:   5805:d048458307b7
user:        Yury Selivanov <yselivanov at sprymix.com>
date:        Wed Apr 29 12:09:19 2015 -0400
summary:
  pep-0492: Add invalid syntax examples; fix typo.

files:
  pep-0492.txt |  14 ++++++++++++--
  1 files changed, 12 insertions(+), 2 deletions(-)


diff --git a/pep-0492.txt b/pep-0492.txt
--- a/pep-0492.txt
+++ b/pep-0492.txt
@@ -171,7 +171,7 @@
 from``.  The main difference is that *await expressions* do not require
 parentheses around them most of the times.
 
-Examples:
+Valid syntax examples:
 
 ================================== ==================================
 Expression                         Will be parsed as
@@ -187,6 +187,16 @@
 ``await foo() + await bar()``      ``(await foo()) + (await bar())``
 ================================== ==================================
 
+Invalid syntax examples:
+
+================================== ==================================
+Expression                         Should be written as
+================================== ==================================
+``await await coro()``             ``await (await coro())``
+``await -coro()``                  ``await (-coro())``
+================================== ==================================
+
+
 See `Grammar Updates`_ section for details.
 
 
@@ -718,7 +728,7 @@
     async def foo():                               # 2
         return (await fut)
 
-This limitation will go away as soon as ``async`` and ``await`` ate
+This limitation will go away as soon as ``async`` and ``await`` are
 proper keywords.  Or if it's decided to use a future import for this
 PEP.
 

-- 
Repository URL: https://hg.python.org/peps


More information about the Python-checkins mailing list