[Python-ideas] An exhaust() function for iterators
storchaka at gmail.com
Sun Sep 29 22:42:20 CEST 2013
29.09.13 07:06, Clay Sweetser написав(ла):
> I would like to propose that this function, or one very similar to it,
> be added to the standard library, either in the itertools module, or
> the standard namespace.
> If nothing else, doing so would at least give a single *obvious* way
> to exhaust an iterator, instead of the several miscellaneous methods
I prefer optimize the for loop so that it will be most efficient way (it
is already most obvious way).
More information about the Python-ideas