"James J. Besemer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I propose that we extend the semantics of "print" such that if the object > to > be printed is a generator then print would iterate over the resulting > sequence of sub-objects and recursively print each of the items in order.
A generator is an iterator produced by a generator function rather than a class. What treat them differently? Iterating over an iterator is usually destructive. So you would be printing what it was but no longer is. This is why iterators are printed differently from sequences. Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list