George Sakkis wrote:
> far too often I use the idiom dict(zip(keys,values)), or
> the same with izip. How does letting dict take two positional
> arguments sound ?
I think the dict constructor is already a bit too complicated, and
would prefer that it be a separate classmethod, such as
dict.
Andrew Koenig wrote:
>> Unfortunately
>>
>>dict(keys=keys, values=values) == {keys: values}
>
> Ummm, no:
>
> dict(keys=keys, values=values) == {'keys': keys, 'values': values}
>
Of course I should really have written
dict(keys=keys, values=values) != dict(zip(keys, values))
reg
> Unfortunately
>
>dict(keys=keys, values=values) == {keys: values}
Ummm, no:
dict(keys=keys, values=values) == {'keys': keys, 'values': values}
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/py
George Sakkis wrote:
> Um, you do realize that dict(keys=keys, values=values) is already
> valid and quite different from dict(zip(keys, values)), don't you ? :)
Sorry, minor misreading on my part. Like that time in Sunday school when
I missed the "not" in "Though shall not kill". That was a ro
Brian Quinlan wrote:
> George Sakkis wrote:
>> Perhaps this has been brought up in the past but I couldn't find it in
>> the archives: far too often I use the idiom dict(zip(keys,values)), or
>> the same with izip. How does letting dict take two positional
>> arguments sound ?
>>
>> Pros:
>> - Pret
On 2/1/07, Brian Quinlan <[EMAIL PROTECTED]> wrote:
> George Sakkis wrote:
> > Perhaps this has been brought up in the past but I couldn't find it in
> > the archives: far too often I use the idiom dict(zip(keys,values)), or
> > the same with izip. How does letting dict take two positional
> > argu
George Sakkis wrote:
> Perhaps this has been brought up in the past but I couldn't find it in
> the archives: far too often I use the idiom dict(zip(keys,values)), or
> the same with izip. How does letting dict take two positional
> arguments sound ?
>
> Pros:
> - Pretty obvious semantics, no ment
Perhaps this has been brought up in the past but I couldn't find it in
the archives: far too often I use the idiom dict(zip(keys,values)), or
the same with izip. How does letting dict take two positional
arguments sound ?
Pros:
- Pretty obvious semantics, no mental overhead to learn and remember i