[Python-3000] Nested Iteration?
Calvin Spealman
ironfroggy at gmail.com
Wed Oct 4 11:48:33 CEST 2006
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/
More information about the Python-3000
mailing list