Duncan> I think I'd prefer the barbaric:
Duncan> return len(list(iterator))
Duncan> since at least it is guaranteed to terminate.
Are you sure? There's no guarantee that an iterator will terminate:
len(list(itertools.cycle(range(10))))
Skip
--
http://mail.python.org/mailman/listinfo/python-list
