mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 03:44:55 +00:00 
			
		
		
		
	Add keyword arg support to itertools.repeat().
This commit is contained in:
		
							parent
							
								
									15a4950da1
								
							
						
					
					
						commit
						f4bb7f2100
					
				
					 2 changed files with 7 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -640,6 +640,7 @@ class TestBasicOps(unittest.TestCase):
 | 
			
		|||
        self.assertNotEqual(len(set(map(id, list(product('abc', 'def'))))), 1)
 | 
			
		||||
 | 
			
		||||
    def test_repeat(self):
 | 
			
		||||
        self.assertEqual(list(repeat(object='a', times=3)), ['a', 'a', 'a'])
 | 
			
		||||
        self.assertEqual(lzip(range(3),repeat('a')),
 | 
			
		||||
                         [(0, 'a'), (1, 'a'), (2, 'a')])
 | 
			
		||||
        self.assertEqual(list(repeat('a', 3)), ['a', 'a', 'a'])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue