diff options
author | Maciej Fijalkowski <fijall@gmail.com> | 2012-08-21 20:40:41 +0200 |
---|---|---|
committer | Maciej Fijalkowski <fijall@gmail.com> | 2012-08-21 20:40:41 +0200 |
commit | 56a3bb839fa7a7c677797729114659f3ee45afb6 (patch) | |
tree | 2e0bf63eb7f98704c6d8504e5d8c4718bb68b1eb /pypy/module/itertools | |
parent | Fix typo (diff) | |
download | pypy-56a3bb839fa7a7c677797729114659f3ee45afb6.tar.gz pypy-56a3bb839fa7a7c677797729114659f3ee45afb6.tar.bz2 pypy-56a3bb839fa7a7c677797729114659f3ee45afb6.zip |
resolve armin's comments
Diffstat (limited to 'pypy/module/itertools')
-rw-r--r-- | pypy/module/itertools/interp_itertools.py | 6 | ||||
-rw-r--r-- | pypy/module/itertools/test/test_itertools.py | 1 |
2 files changed, 0 insertions, 7 deletions
diff --git a/pypy/module/itertools/interp_itertools.py b/pypy/module/itertools/interp_itertools.py index 75e3fdd719..af283d94a5 100644 --- a/pypy/module/itertools/interp_itertools.py +++ b/pypy/module/itertools/interp_itertools.py @@ -112,11 +112,6 @@ class W_Repeat(Wrappable): s = 'repeat(%s)' % (objrepr,) return self.space.wrap(s) - def len(self, space): - if self.count == -1 or not self.counting: - raise OperationError(space.w_TypeError, space.wrap('len() of unsized object')) - return space.wrap(self.count) - def W_Repeat___new__(space, w_subtype, w_object, w_times=None): r = space.allocate_instance(W_Repeat, w_subtype) r.__init__(space, w_object, w_times) @@ -129,7 +124,6 @@ W_Repeat.typedef = TypeDef( __iter__ = interp2app(W_Repeat.iter_w), next = interp2app(W_Repeat.next_w), __repr__ = interp2app(W_Repeat.repr_w), - __len__ = interp2app(W_Repeat.len), __doc__ = """Make an iterator that returns object over and over again. Runs indefinitely unless the times argument is specified. Used as argument to imap() for invariant parameters to the called diff --git a/pypy/module/itertools/test/test_itertools.py b/pypy/module/itertools/test/test_itertools.py index aef859dbc6..61c905d810 100644 --- a/pypy/module/itertools/test/test_itertools.py +++ b/pypy/module/itertools/test/test_itertools.py @@ -93,7 +93,6 @@ class AppTestItertools: r = itertools.repeat('a', 15) r.next() - assert len(r) == 14 <-- no, python 2.7 does not have len(r) raises(TypeError, "len(itertools.repeat('xkcd'))") def test_takewhile(self): |