wrapping yield ?
tjreedy at udel.edu
Thu Sep 12 18:45:17 CEST 2002
"Michael Sparks" <Michael.Sparks at rd.bbc.co.uk> wrote in message
news:alqehl$9qv$1 at nntp0.reith.bbc.co.uk...
> I'd like to be able to wrap "yield" in a function - is that
> possible, and if not (my eading of stuff I've seen so far
> says not) are there any plans to make it possible?
> Whilst it may seem odd, I'd like to be able to do this:
> def my_generator(arg):
You have to put in a yield x *somewhere* in order to yield anything to
Hard to see why this is a problem. Something like
x = wait....
More information about the Python-list