[Python-3000] Nested Iteration?

Guido van Rossum guido at python.org
Wed Oct 4 16:29:41 CEST 2006


Let me nip this in the bud with a healthy -1000. It would forever
destroy clarity.

On 10/4/06, Calvin Spealman <ironfroggy at gmail.com> wrote:
> I'm sure this has been brought up before, either for Py3K or in
> previous development, so just let me know if its already been
> shotdown. Maybe even give it a second thought.
>
> for i in some_list in some_list_of_lists:
>     do_something_with(i)
>
> Currently, this is passed iterating over the results of (some_list in
> some_list_of_lists), which shouldn't ever reveal an iterable result,
> so is there any danger in making the for loops, listcomps, and genexps
> take special meaning to this chaining of iterators?
>
> This might even remove a great number of the ever-repeating "Why isn't
> there a standard flatten function?" debates, because it would provide
> a simple, intuitive, understandable base for most any way you would
> want to flatten things.
>
> --
> Read my blog! I depend on your acceptance of my opinion! I am interesting!
> http://ironfroggy-code.blogspot.com/
> _______________________________________________
> Python-3000 mailing list
> Python-3000 at python.org
> http://mail.python.org/mailman/listinfo/python-3000
> Unsubscribe: http://mail.python.org/mailman/options/python-3000/guido%40python.org
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list