Lines Matching refs:iterable
203 def nlargest(n, iterable): argument
210 it = iter(iterable)
221 def nsmallest(n, iterable): argument
228 it = iter(iterable)
399 def nsmallest(n, iterable, key=None): argument
406 it = iter(iterable)
416 size = len(iterable)
421 return sorted(iterable, key=key)[:n]
425 it = izip(iterable, count()) # decorate
430 in1, in2 = tee(iterable)
436 def nlargest(n, iterable, key=None): argument
444 it = iter(iterable)
454 size = len(iterable)
459 return sorted(iterable, key=key, reverse=True)[:n]
463 it = izip(iterable, count(0,-1)) # decorate
468 in1, in2 = tee(iterable)