A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-September/074785.html below:

[Python-Dev] Adding concat function to itertools

[Python-Dev] Adding concat function to itertools [Python-Dev] Adding concat function to itertoolsDamien Miller djm at mindrot.org
Sat Sep 29 00:09:32 CEST 2007
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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4