Re: Verbose and flexible args and kwargs syntax



On 12 December 2011 15:52, Terry Reedy <tjreedy@xxxxxxxx> 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
.



Relevant Pages

  • Re: Measuring CSI
    ... that a *sequence* provides? ... CSI has a lot to do with function. ... the 'target' and the 'reference'. ... distance of a string compared to a specific position in sequence space ...
    (talk.origins)
  • Re: Felsenstein v. Dembski
    ... the Hamming distance between: ... How do you define a "valid" vs. an "invalid" sequence? ... proceeded if the lengths of all proteins had to remain constant. ... matters is the location of potential target sequences (i.e., ...
    (talk.origins)
  • Re: Speciation Hurdle
    ... > It appears that you have no idea what transcription factors are, ... > What does it mean for a gene to "fail"? ... small changes to a sequence make small changes to the binding efficiency of any protein for whic it's a target. ...
    (talk.origins)
  • Re: Possible vs. Likely
    ... Biological evolution isn't a search algorithm that moves form one ... There is no concept of 'target' ... outnumber the potential targets within sequence space and this ratio ... Sequences that require greater specificity are much more widely spaced ...
    (talk.origins)
  • Re: Speciation Hurdle
    ... > It appears that you have no idea what transcription factors are, ... >> the ability to read the target site. ... > What does it mean for a gene to "fail"? ... there may be nowhere in the genome that we find that sequence. ...
    (talk.origins)