Raymond Hettinger added the comment: This isn't a bug. It is an intended feature that chain.from_iterable evaluates lazily (and is documented as such). The pure python equivalent in the docs behaves the same as the C version does.
Also, it is a long standing feature of lists that you can loop over them while mutating them (I've seen more than a few pieces of code that take advantage of that feature). ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16791> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com