mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Issue #23456: Add missing @coroutine decorators in asyncio
This commit is contained in:
		
							parent
							
								
									d55436ace3
								
							
						
					
					
						commit
						d6dc7bdaf9
					
				
					 3 changed files with 5 additions and 0 deletions
				
			
		|  | @ -162,6 +162,7 @@ def __exit__(self, *args): | |||
|         # always raises; that's how the with-statement works. | ||||
|         pass | ||||
| 
 | ||||
|     @coroutine | ||||
|     def __iter__(self): | ||||
|         # This is not a coroutine.  It is meant to enable the idiom: | ||||
|         # | ||||
|  | @ -362,6 +363,7 @@ def __enter__(self): | |||
|     def __exit__(self, *args): | ||||
|         pass | ||||
| 
 | ||||
|     @coroutine | ||||
|     def __iter__(self): | ||||
|         # See comment in Lock.__iter__(). | ||||
|         yield from self.acquire() | ||||
|  | @ -446,6 +448,7 @@ def __enter__(self): | |||
|     def __exit__(self, *args): | ||||
|         pass | ||||
| 
 | ||||
|     @coroutine | ||||
|     def __iter__(self): | ||||
|         # See comment in Lock.__iter__(). | ||||
|         yield from self.acquire() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner