What about co-routines? >>> def coroutine(): ... a, b = (yield *[1,2]) ... print (a) ... print (b) ... >>> cr=coroutine() >>> next(cr) 1 >>> cr.send(3) 2 >>> cr.send(4) 3 4 >>>
On Sat, Mar 15, 2008 at 7:21 PM, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > What do people think? > > I think this idea (or variants thereof) has been suggested a few times > over the years, and I don't think the arguments against it have ever > been particularly compelling. The difference this time is that PEP 3132 > has done the work of thrashing out some of the semantic details, and > Thomas has provided an actual working patch to make it happen :) > > So +1 here, even though I expect style guides will end up discouraging > some of the more obscure possible uses. > > Cheers, > Nick. > > -- > Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia > --------------------------------------------------------------- > http://www.boredomandlaziness.org > _______________________________________________ > Python-3000 mailing list > Python-3000@python.org > http://mail.python.org/mailman/listinfo/python-3000 > Unsubscribe: > http://mail.python.org/mailman/options/python-3000/nevillegrech%40gmail.com > -- Regards, Neville Grech
_______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com