On 9/22/06, Josiah Carlson <jcarlson at uci.edu> wrote: > > Michael Foord <fuzzyman at voidspace.org.uk> wrote: > > > > Hello all, > > > > I have a suggestion for a new Python built in function: 'flatten'. > > This has been brought up many times. I'm -1 on its inclusion, if only > because it's a fairly simple 9-line function (at least the trivial > version I came up with), and not all X-line functions should be in the > standard library. Also, while I have had need for such a function in > the past, I have found that I haven't needed it in a few years. I think instead of adding a flatten function perhaps we should think about adding something like Erlang's "iolist" support. The idea is that methods like "writelines" should be able to take nested iterators and consume any object they find that implements the buffer protocol. -bob
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