[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

AltStyle によって変換されたページ (->オリジナル) /