count items in generator
Delaney, Timothy (Tim)
tdelaney at avaya.com
Sun May 14 18:47:10 EDT 2006
Delaney, Timothy (Tim) wrote:
> Actually len(itertools.count()) would as well - when a couple of long
> instances used up everything available - but it would take a *lot*
> longer.
Actually, this would depend on whether len(iterable) used a C integral
variable to accumulate the length (which would roll over and never end)
or a Python long (which would eventually use up all memory).
Tim Delaney
More information about the Python-list
mailing list