Tuple comprehension
Sean 'Shaleh' Perry
shalehperry at attbi.com
Thu Apr 11 01:23:12 EDT 2002
On 11-Apr-2002 Emile van Sebille wrote:
> Magnus Lie Hetland
>> As far as I can see, the PEP on dict comprehension is still open... I
>> think both dictionary comprehension and tuple comprehension seem like
>> natural parallels to list comprehension. But then I would, wouldn't I?
>> <wink>
>>
>
> Why not just tuple([my list comp]) ?
>
because it feels wrong to create a (possibly large) list and then duplicate it
into a tuple. My mind sees that and thinks 'overhead'.
More information about the Python-list
mailing list