On 12 December 2011 15:52, Terry Reedy <tjre...@udel.edu> wrote: > No, *target unpacking (singular) is quite useful in specialized cases. But > it is not specifically head/tail unpacking. > >>>> a,*b,c = 1,2,3,4,5,6 >>>> a,b,c > (1, [2, 3, 4, 5], 6) >>>> *a,b,c = 1,2,3,4,5 >>>> a,b,c > ([1, 2, 3], 4, 5) > >> I personally quite like them, but I would like them to be more general. > > > It already is. The *target can be anywhere in the sequence. > > -- > Terry Jan Reedy
You can even have nested sequences! >>> a, (b, *c), *d = 1, "two", 3, 4 -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list