On 9/22/07, Bruce Frederiksen <[EMAIL PROTECTED]> wrote:
>
>  I've added a new function to itertools called 'concat'.  This function is
> much like chain, but takes all of the iterables as a single argument.  Thus
> concat(some_iterables) is logically equivalent to chain(*some_iterables);
> the difference being that chain(*some_iterables) results in some_iterables
> being fully expanded before the call to chain, while concat(some_iterables)
> only iterates on some_iterables as needed.  This makes concat more
> attractive when some_iterables is either expensive to expand or "infinite"
> in length.
>
>  Thus, concat(iterable) is like:
>
>  def concat(iterables):
>  for it in iterables:
>  for element in it:
>  yield element
>
>
>
>  I've attached an updated itertoolsmodule.c file to this email with concat
> added to it.  This was based on the 2.5.1 source.
>
>  I ask that this be considered for adoption into standard python.
>
>  Thanks in advance!
>

Best thing to do is to put this up on the bug tracker
(bugs.python.org) and assign it to Raymond Hettinger as itertools is
his baby.

-Brett
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to