[Python-iterators] RE: Meta: PEP discussion (was Re: PEP 255: Simple Generators)
Scott David Daniels
Scott.Daniels at Acm.Org
Sat Jul 7 23:18:20 EDT 2001
More information about the Python-list mailing list
Sat Jul 7 23:18:20 EDT 2001
- Previous message (by thread): 2.2+ == 3000? (was Re: Comment on PEP-0238)
- Next message (by thread): anonymous variable
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Gordon McMillan" <gmcm at hypernet.com> wrote in message news:mailman.993160113.18969.python-list at python.org... > Steven D. Majewski wrote: > > > My 'suspend value' actually got transformed into returning the > > tuple > > (value, suspended-frame), so to use it in a loop required > > something > > like: > > > > iterf = function # don't mung up the global name > > while 1: > > value, iterf = iterf( args... ) > > ... # first time, call the function > > # all others, call the suspended activation frame How about the following (to make the loop control obvious): iterf = function # don't mung up the global name while iterf: value, iterf = iterf( args... ) ... # first time, call the function # all others, call the suspended activation frame
- Previous message (by thread): 2.2+ == 3000? (was Re: Comment on PEP-0238)
- Next message (by thread): anonymous variable
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list