Pythonification of the asterisk-based collection packing/unpacking syntax

Eelco hoogendoorn.eelco at gmail.com
Sat Dec 24 12:21:37 EST 2011


On Dec 24, 3:57 pm, Chris Angelico <ros... at gmail.com> wrote:
> On Sun, Dec 25, 2011 at 1:47 AM, Eelco <hoogendoorn.ee... at gmail.com> wrote:
> > a, middle::tuple, b = ::sequence
>
> Then it ought to be
>
> ::(a, middle::tuple, b) = ::sequence
>
> or something, because you're doing the same thing on both sides.
>
> ChrisA

Thats a fair point; something to think about. It all depends on how
you define the rules of course; im trying to stay as close as possible
to the original python rules, where the (un)packing of comma-seperated
identifiers is implicit. Probably best to keep it that way, from the
looks of it :).



More information about the Python-list mailing list