From 4824534f8a61746fd8235e7ae9deba3b619ac943 Mon Sep 17 00:00:00 2001 From: Robin Roth Date: Wed, 1 Nov 2017 14:22:15 +0100 Subject: [PATCH] Support async for statement --- parso/python/tree.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/parso/python/tree.py b/parso/python/tree.py index a38b70d..eb97780 100644 --- a/parso/python/tree.py +++ b/parso/python/tree.py @@ -1161,4 +1161,5 @@ class CompFor(PythonBaseNode): """ Returns the a list of `Name` that the comprehension defines. """ - return _defined_names(self.children[1]) + # allow async for + return _defined_names(self.children[self.children.index('for') + 1])