Re: Best idiom to unpack a variable-size sequence

2007-12-18 Thread Duncan Booth
ram <[EMAIL PROTECTED]> wrote: > Here's a little issue I run into more than I like: I often need to > unpack a sequence that may be too short or too long into a fixed-size > set of items: > > a, b, c = seq # when seq = (1, 2, 3, 4, ...) or seq = (1, 2) > > What I usually do is something lik

Re: Best idiom to unpack a variable-size sequence

2007-12-18 Thread George Sakkis
On Dec 18, 12:49 pm, ram <[EMAIL PROTECTED]> wrote: > Here's a little issue I run into more than I like: I often need to > unpack a sequence that may be too short or too long into a fixed-size > set of items: > > a, b, c = seq # when seq = (1, 2, 3, 4, ...) or seq = (1, 2) > > What I usually d