[Python-3000] Using *a for packing in lists and other places
Neville Grech Neville Grech
nevillegrech at gmail.com
Sat Mar 15 20:44:19 CET 2008
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 <ncoghlan at gmail.com> 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 | ncoghlan at gmail.com | Brisbane, Australia
> ---------------------------------------------------------------
> http://www.boredomandlaziness.org
> _______________________________________________
> Python-3000 mailing list
> Python-3000 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20080315/cae04e58/attachment.htm
More information about the Python-3000
mailing list