This website requires JavaScript.
Explore
Help
Sign in
Stowage
/
cpython
Watch
2
Star
0
Fork
You've already forked cpython
0
mirror of
https://github.com/python/cpython.git
synced
2025-10-23 01:43:53 +00:00
Code
Issues
Projects
Releases
Packages
Wiki
Activity
4dd27f0adc
cpython
/
Lib
/
test
/
badsyntax_async1.py
3 lines
45 B
Python
Raw
Normal View
History
Unescape
Escape
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 13:33:45 +03:00
async
def
foo
(
a
=
await
something
(
)
)
:
pass
Reference in a new issue
Copy permalink