Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xavier Thompson
cython
Commits
0beafeee
Commit
0beafeee
authored
Jul 29, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
continue to disallow "yield from" in async functions
parent
e3ec8cd8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+2
-1
tests/errors/pep492_badsyntax_async7.pyx
tests/errors/pep492_badsyntax_async7.pyx
+0
-1
No files found.
Cython/Compiler/ExprNodes.py
View file @
0beafeee
...
...
@@ -9415,7 +9415,7 @@ class YieldExprNode(ExprNode):
expr_keyword
=
'yield'
def
analyse_types
(
self
,
env
):
if
not
self
.
label_num
:
if
not
self
.
label_num
or
(
self
.
is_yield_from
and
self
.
in_async_gen
)
:
error
(
self
.
pos
,
"'%s' not supported here"
%
self
.
expr_keyword
)
self
.
is_temp
=
1
if
self
.
arg
is
not
None
:
...
...
@@ -9552,6 +9552,7 @@ class AwaitExprNode(YieldFromExprNode):
# arg ExprNode the Awaitable value to await
# label_num integer yield label number
is_yield_from
=
False
is_await
=
True
expr_keyword
=
'await'
...
...
tests/errors/pep492_badsyntax_async7.pyx
View file @
0beafeee
...
...
@@ -6,5 +6,4 @@ async def foo():
_ERRORS
=
"""
5:4: 'yield from' not supported here
5:4: 'yield' not allowed in async coroutines (use 'await')
"""
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment