<div dir="ltr"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Sat, Nov 10, 2018 at 6:56 PM Jonathan Crall <<a href="mailto:erotemic@gmail.com">erotemic@gmail.com</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="color:rgb(0,0,0)">Sometimes there's a good, useful function than doesn't get added because <br></span><span style="color:rgb(0,0,0)">there's no reasonable place to put it. For example, a "flatten" function <br></span><span style="color:rgb(0,0,0)">has been talked about since Python 1.x days, and we still don't have a <br></span><span style="color:rgb(0,0,0)">standard solution for it, because (1) it isn't clear *precisely* what it <br></span><span style="color:rgb(0,0,0)">should do, and (2) it isn't clear where it should go.</span></blockquote><div> </div><div>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."?</div></div></blockquote><div><br></div><div><a href="https://docs.python.org/3/library/itertools.html#itertools-recipes">https://docs.python.org/3/library/itertools.html#itertools-recipes</a></div><div>There's an example of ``flatten`` in the itertools recipes. </div></div></div></div>