Convert iterator __len__() methods to a private API.

This commit is contained in:
Raymond Hettinger 2005-09-24 21:23:05 +00:00
parent 9ceebd5445
commit 6b27cda643
16 changed files with 169 additions and 94 deletions

View file

@ -670,6 +670,7 @@ class TestVariousIteratorArgs(unittest.TestCase):
class LengthTransparency(unittest.TestCase):
def test_repeat(self):
from test.test_iterlen import len
self.assertEqual(len(repeat(None, 50)), 50)
self.assertRaises(TypeError, len, repeat(None))