mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 11:49:12 +00:00 
			
		
		
		
	Issue 24088: Clarify semantics of yield expression (merge from 3.4).
This commit is contained in:
		
						commit
						19dac071ef
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -325,7 +325,7 @@ thus can only be used in the body of a function definition.  Using a yield
 | 
				
			||||||
expression in a function's body causes that function to be a generator.
 | 
					expression in a function's body causes that function to be a generator.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
When a generator function is called, it returns an iterator known as a
 | 
					When a generator function is called, it returns an iterator known as a
 | 
				
			||||||
generator.  That generator then controls the execution of a generator function.
 | 
					generator.  That generator then controls the execution of the generator function.
 | 
				
			||||||
The execution starts when one of the generator's methods is called.  At that
 | 
					The execution starts when one of the generator's methods is called.  At that
 | 
				
			||||||
time, the execution proceeds to the first yield expression, where it is
 | 
					time, the execution proceeds to the first yield expression, where it is
 | 
				
			||||||
suspended again, returning the value of :token:`expression_list` to the generator's
 | 
					suspended again, returning the value of :token:`expression_list` to the generator's
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue