[Python-Dev] Short-circuiting iterators

Matthew F. Barnes mfb at lotusland.dyndns.org
Wed Nov 30 20:52:03 CET 2005


On Wed, 2005-11-30 at 14:36 -0500, Edward Loper wrote:
> There's no need to change the iterator protocol for your example use 
> case; you could just define a simple iterator-wrapper:

Good point.  Perhaps it would be a useful addition to the itertools
module then?

        itertools.interruptable(iterable)

Matthew Barnes


More information about the Python-Dev mailing list