mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Eliminate the double reverse option. It's only use case
was academic and it was potentially confusing to use.
This commit is contained in:
parent
a6366fe085
commit
d2c36261a2
2 changed files with 2 additions and 17 deletions
|
@ -141,11 +141,8 @@ class TestReversed(unittest.TestCase):
|
|||
x = xrange(1)
|
||||
self.assertEqual(type(reversed(x)), type(iter(x)))
|
||||
|
||||
def test_double_reverse(self):
|
||||
s = 'hello'
|
||||
self.assertEqual(list(reversed(reversed(s))), list(s))
|
||||
|
||||
def test_len(self):
|
||||
# This is an implementation detail, not an interface requirement
|
||||
s = 'hello'
|
||||
self.assertEqual(len(reversed(s)), len(s))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue