[issue24528] Misleading exeption for await in comprehensions.

2015-07-01 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Yury, thank you for the patch, the error message is much clearer now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24528 ___

[issue24528] Misleading exeption for await in comprehensions.

2015-06-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 30b676e8b21f by Yury Selivanov in branch '3.5': Issue #24528: Improve error message for awaits in comprehensions https://hg.python.org/cpython/rev/30b676e8b21f New changeset 9598bc916186 by Yury Selivanov in branch 'default': Merge 3.5 (Issue

[issue24528] Misleading exeption for await in comprehensions.

2015-06-30 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24528 ___

[issue24528] Misleading exeption for await in comprehensions.

2015-06-29 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- assignee: - yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24528 ___ ___

[issue24528] Misleading exeption for await in comprehensions.

2015-06-29 Thread Ivan Levkivskyi
New submission from Ivan Levkivskyi: The following code: async def foo(): lst = [await coro(i) for i in range(10)] return lst gives SyntaxError: 'await' outside async function I understand that this is because the comprehensions are implemented using a function scope (see also

[issue24528] Misleading exeption for await in comprehensions.

2015-06-29 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks for discovering this, Ivan. The patch is attached. -- keywords: +needs review, patch nosy: +ncoghlan stage: - patch review Added file: http://bugs.python.org/file39834/awaitcomp.patch ___ Python tracker