James J. Besemer a écrit : > (snip) > > PEP -- EXTEND PRINT TO EXPAND GENERATORS > > NUTSHELL > > 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. >
Please, don't: from itertools import cycle def mygen(): return cycle('this is a very bad idea'.split()) -- http://mail.python.org/mailman/listinfo/python-list