mirror of
https://github.com/python/cpython.git
synced 2025-07-28 13:44:43 +00:00
Add keyword arg support to itertools.repeat().
This commit is contained in:
parent
2e2909f584
commit
182edaefb5
2 changed files with 7 additions and 7 deletions
|
@ -632,6 +632,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(zip(xrange(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