[Python-Dev] Suggestion for a new built-in - flatten

Brett Cannon brett at python.org
Fri Sep 22 21:01:28 CEST 2006


On 9/22/06, skip at pobox.com <skip at pobox.com> wrote:
>
>
>     Michael> There are several different possible approaches in pure
> Python,
>     Michael> but is this an idea that has legs ?
>
> Why not add it to itertools?  Then, if you need a true list, just call
> list() on the returned iterator.


Yeah, this is a better solution.  flatten() just doesn't scream "built-in!"
to me.

-Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20060922/35d33452/attachment.htm 


More information about the Python-Dev mailing list