Skip to content

Commit

Permalink
Remove testing function
Browse files Browse the repository at this point in the history
  • Loading branch information
bbayles committed Mar 2, 2017
1 parent 343311d commit 0dc642c
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions more_itertools/more.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,19 +378,6 @@ def ilen(iterable):
return d[0][0] if d else 0


def ilen_2(iterable):
"""Return the number of items in ``iterable``.
>>> ilen(x for x in range(1000000) if x % 3 == 0)
333334
This does, of course, consume the iterable, so handle it with care.
"""
d = deque(enumerate(iterable, 1), maxlen=1)
return d[0][0] if d else 0


def iterate(func, start):
"""Return ``start``, ``func(start)``, ``func(func(start))``, ...
Expand Down

0 comments on commit 0dc642c

Please sign in to comment.