Convenience function for partially consuming a long of infinite iterable
(n, seq)
| 59 | raise StopIteration |
| 60 | |
| 61 | def take(n, seq): |
| 62 | 'Convenience function for partially consuming a long of infinite iterable' |
| 63 | return list(islice(seq, n)) |
| 64 | |
| 65 | def prod(iterable): |
| 66 | return reduce(operator.mul, iterable, 1) |
no test coverage detected
searching dependent graphs…