On Fri, 28 Sep 2007, Raymond Hettinger wrote:

> > Interestingly, they seem to all have something to do with dictionary  
> > values() that are themselves iterable.
> 
> I see.  These are instances of a recurring general use case of
> chain() as a one-level flattener.
> 
> Will give consideration to changing the signature of chain() for Py3.0.
> Besides the concat() variation using a single iterable input, another
> alternative is the min()/max() style signature where one input is
> interpreted as iterable and multiple arguments as comprising an
> input tuple.

Has anyone considered making the iterator __add__ operator perform
something similar to chain? I.e.

list(a + b) => [ a0, a1, ... an, b0, b1, bn]

(where "a" and "b" are iterables)

-d
_______________________________________________
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