On Sat, Nov 10, 2018 at 6:56 PM Jonathan Crall <erote...@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."?
>

https://docs.python.org/3/library/itertools.html#itertools-recipes
There's an example of ``flatten`` in the itertools recipes.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to