George Sakkis wrote: > Paul Rubin wrote: > >> [EMAIL PROTECTED] (Cameron Laird) writes: >>> For that matter, would it be an advantage for len() to operate >>> on iterables? >> >> print len(itertools.count()) >> >> Ouch!! > > How is this worse than list(itertools.count()) ?
list(itertools.count()) will eventually fail with a MemoryError. Actually len(itertools.count()) would as well - when a couple of long instances used up everything available - but it would take a *lot* longer. Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list