]> granicus.if.org Git - python/commitdiff
Issue #28008: Fix test_unparse
authorYury Selivanov <yury@magic.io>
Fri, 9 Sep 2016 18:48:39 +0000 (11:48 -0700)
committerYury Selivanov <yury@magic.io>
Fri, 9 Sep 2016 18:48:39 +0000 (11:48 -0700)
Tools/parser/unparse.py

index 6c296bde759c7b1959a791b172056df32d5d9447..7e1cc4ea5db95017a290f29cac578febce8d22ae 100644 (file)
@@ -444,7 +444,10 @@ class Unparser:
         self.write("}")
 
     def _comprehension(self, t):
-        self.write(" for ")
+        if t.is_async:
+            self.write(" async for ")
+        else:
+            self.write(" for ")
         self.dispatch(t.target)
         self.write(" in ")
         self.dispatch(t.iter)