mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	bpo-32722: Remove useless example in the Classes tutorial (#5446)
In the tutorial about the Generator expression, there is an example with a dict comprehension and not with a generator expression, just removed the code.
This commit is contained in:
		
							parent
							
								
									07a1892f82
								
							
						
					
					
						commit
						ab328756d7
					
				
					 2 changed files with 3 additions and 4 deletions
				
			
		| 
						 | 
					@ -892,10 +892,7 @@ Examples::
 | 
				
			||||||
   >>> sum(x*y for x,y in zip(xvec, yvec))         # dot product
 | 
					   >>> sum(x*y for x,y in zip(xvec, yvec))         # dot product
 | 
				
			||||||
   260
 | 
					   260
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   >>> from math import pi, sin
 | 
					   >>> unique_words = set(word for line in page  for word in line.split())
 | 
				
			||||||
   >>> sine_table = {x: sin(x*pi/180) for x in range(0, 91)}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
   >>> unique_words = set(word  for line in page  for word in line.split())
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
   >>> valedictorian = max((student.gpa, student.name) for student in graduates)
 | 
					   >>> valedictorian = max((student.gpa, student.name) for student in graduates)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,2 @@
 | 
				
			||||||
 | 
					Remove the bad example in the tutorial of the Generator Expression. Patch by
 | 
				
			||||||
 | 
					Stéphane Wirtel
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue