[Python-ideas] Proposing additions to the standard library

Michael Selik mike at selik.org
Mon Nov 12 14:36:59 EST 2018

On Sat, Nov 10, 2018 at 6:56 PM Jonathan Crall <erotemic at gmail.com> wrote:

> Sometimes there's a good, useful function than doesn't get added because
>> there's no reasonable place to put it. For example, a "flatten" function
>> has been talked about since Python 1.x days, and we still don't have a
>> standard solution for it, because (1) it isn't clear *precisely* what it
>> should do, and (2) it isn't clear where it should go.
> The flatten example is good to know about. Is there a link to this
> discussion or a summary of it? I would think flatten could go in itertools,
> but clearly there must some reason why its not there. I imagine the
> duplication with it.chain.from_iter + "There should be one-- and preferably
> only one --obvious way to do it."?

There's an example of ``flatten`` in the itertools recipes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20181112/976b0a46/attachment.html>

More information about the Python-ideas mailing list