We already have yield expressions and they mean something else... On Sat, Feb 7, 2009 at 1:04 AM, Greg Ewing <greg.ew...@canterbury.ac.nz> wrote: > Guido van Rossum wrote: > >> It would be way too confusing to have "a different form of call" with >> totally different semantics that nevertheless used the same >> *terminology* as is used for regular calls. > > I expect you're right, so I won't argue for calling > it "call" any more. > > I'd still like to find a good name for it, though. > The other important thing is that my proposed construct > should be usable as an expression, and its value > should be whatever is returned by the called generator > when it exits. E.g. if we continue spelling it > "yield *" for the moment, then > > def f(): > v = yield *g() > print v > > def g(): > yield 42 > return "spam" > > for x in f(): > pass > > should end up printing "spam". > > Would you entertain the idea of a "yield *" expression > with those semantics? > > -- > Greg > _______________________________________________ > Python-Dev mailing list > Python-Dev@python.org > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > http://mail.python.org/mailman/options/python-dev/guido%40python.org >
-- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com