Pythonification of the asterisk-based collection packing/unpacking syntax

Rick Johnson rantingrickjohnson at gmail.com
Sun Dec 18 19:59:22 EST 2011


On Dec 17, 11:33 pm, Evan Driscoll <edrisc... at wisc.edu> wrote:
> On 12/17/2011 22:52, buck wrote:> Try these on for size.
>
> >      head, @tuple tail = sequence
> >      def foo(@list args, @dict kwargs): pass
> >      foo(@args, @kwargs)
>
> > For backward compatibility, we could say that the unary * is identical to @list and unary ** is identical to @dict.
>
> I like this idea much more than the original one.

+1. I will second that! Eelco has the CORRECT idea, but the WRONG
syntax!



More information about the Python-list mailing list