This website requires JavaScript.
Explore
Help
Register
Sign In
Rooba
/
cpython
mirror of
https://github.com/python/cpython.git
Watch
1
Star
0
Fork
You've already forked cpython
0
Code
Issues
Packages
Projects
Releases
Wiki
Activity
af580dff4a
cpython
/
Lib
/
test
/
badsyntax_async4.py
3 lines
27 B
Python
Raw
Normal View
History
Unescape
Escape
PEP 0492 -- Coroutines with async and await syntax. Issue #24017.
2015-05-12 02:57:16 +00:00
async
def
foo
(
)
:
Issue #24619: New approach for tokenizing async/await. This commit fixes how one-line async-defs and defs are tracked by tokenizer. It allows to correctly parse invalid code such as: >>> async def f(): ... def g(): pass ... async = 10 and valid code such as: >>> async def f(): ... async def g(): pass ... await z As a consequence, is is now possible to have one-line 'async def foo(): await ..' functions: >>> async def foo(): return await bar()
2015-07-22 10:33:45 +00:00
await