On Nov 27, 11:18 pm, boblatest wrote:
> Hello all,
>
> (sorry for posting from Google. I currently don't have access to my
> normal nntp account.)
>
> Here's my question: Given a list of onknown length, I'd like to be
> able to do the following:
>
> (a, b, c, d, e, f) = list
>
> If the list has fe
On Fri, 27 Nov 2009 04:18:08 -0800, boblatest wrote:
> Here's my question: Given a list of onknown length, I'd like to be able
> to do the following:
>
> (a, b, c, d, e, f) = list
>
> If the list has fewer items than the tuple, I'd like the remaining tuple
> elements to be set to "None". If the
In article
,
inhahe wrote:
> maybe that thing in python 3 that someone mentioned is the answer, but
> otherwise i always think Python should admit something like this:
>
> a, b, c, *d = list
>
> i.e. if list were [1,2,3,4,5], you'd get a=1, b=2, c=3, d=[4, 5]
Extended iterable unpacking (http
On Sun, Nov 29, 2009 at 4:42 AM, inhahe wrote:
> maybe that thing in python 3 that someone mentioned is the answer, but
> otherwise i always think Python should admit something like this:
>
> a, b, c, *d = list
>
> i.e. if list were [1,2,3,4,5], you'd get a=1, b=2, c=3, d=[4, 5]
>
> not that that
maybe that thing in python 3 that someone mentioned is the answer, but
otherwise i always think Python should admit something like this:
a, b, c, *d = list
i.e. if list were [1,2,3,4,5], you'd get a=1, b=2, c=3, d=[4, 5]
not that that solves the None problem, though i don't have any feature
sugg
Mel, 27.11.2009 18:47:
> Steven D'Aprano wrote:
>> On Fri, 27 Nov 2009 04:18:08 -0800, boblatest wrote:
>>> Here's my question: Given a list of onknown length, I'd like to be able
>>> to do the following:
>>>
>>> (a, b, c, d, e, f) = list
>>>
>>> If the list has fewer items than the tuple, I'd like
Steven D'Aprano wrote:
> On Fri, 27 Nov 2009 04:18:08 -0800, boblatest wrote:
>> Here's my question: Given a list of onknown length, I'd like to be able
>> to do the following:
>>
>> (a, b, c, d, e, f) = list
>>
>> If the list has fewer items than the tuple, I'd like the remaining tuple
>> elemen
On 27 Nov, 12:18, boblatest wrote:
> Hello all,
>
> (sorry for posting from Google. I currently don't have access to my
> normal nntp account.)
>
> Here's my question: Given a list of onknown length, I'd like to be
> able to do the following:
>
> (a, b, c, d, e, f) = list
>
> If the list has fewer
Peter Otten wrote:
boblatest wrote:
Hello all,
(sorry for posting from Google. I currently don't have access to my
normal nntp account.)
Here's my question: Given a list of onknown length, I'd like to be
able to do the following:
(a, b, c, d, e, f) = list
If the list has fewer items than
boblatest, 27.11.2009 13:18:
> Here's my question: Given a list of onknown length, I'd like to be
> able to do the following:
>
> (a, b, c, d, e, f) = list
>
> If the list has fewer items than the tuple, I'd like the remaining
> tuple elements to be set to "None". If the list is longer, I'd like
boblatest wrote:
> Hello all,
>
> (sorry for posting from Google. I currently don't have access to my
> normal nntp account.)
>
> Here's my question: Given a list of onknown length, I'd like to be
> able to do the following:
>
> (a, b, c, d, e, f) = list
>
> If the list has fewer items than th
11 matches
Mail list logo