mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	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()
This commit is contained in:
		
							parent
							
								
									80acc3ebbc
								
							
						
					
					
						commit
						8fb307cd65
					
				
					 13 changed files with 343 additions and 69 deletions
				
			
		|  | @ -1,2 +1,2 @@ | |||
| async def foo(): | ||||
|     async def foo(): await something() | ||||
|     await | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Yury Selivanov
						Yury Selivanov