Re: Proposed new PEP: print to expand generators

2006-06-04 Thread Bruno Desthuilliers
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 prin

Re: Proposed new PEP: print to expand generators

2006-06-04 Thread Terry Reedy
"Mel Wilson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I guess the motivation is the case of people who would set > up an iterator specifically to print from it. for i in gen: print i, print is rather trivial and gives one the option to control formatting however. tjr --

Re: Proposed new PEP: print to expand generators

2006-06-04 Thread Mel Wilson
Terry Reedy wrote: > "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 recursiv

Re: Proposed new PEP: print to expand generators

2006-06-03 Thread Steven Bethard
James J. Besemer wrote: > 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. I don't feel like searching for the specif

Re: Proposed new PEP: print to expand generators

2006-06-03 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "James J. Besemer" <[EMAIL PROTECTED]> wrote: > 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

Re: Proposed new PEP: print to expand generators

2006-06-03 Thread Terry Reedy
"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 item