[Python-Dev] dict(keys, values)

2007-02-01 Thread Jim Jewett
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.

Re: [Python-Dev] dict(keys, values)

2007-02-01 Thread Steve Holden
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

Re: [Python-Dev] dict(keys, values)

2007-02-01 Thread Andrew Koenig
> 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

Re: [Python-Dev] dict(keys, values)

2007-02-01 Thread Brian Quinlan
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

Re: [Python-Dev] dict(keys, values)

2007-02-01 Thread Steve Holden
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

Re: [Python-Dev] dict(keys, values)

2007-02-01 Thread George Sakkis
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

Re: [Python-Dev] dict(keys, values)

2007-02-01 Thread Brian Quinlan
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

[Python-Dev] dict(keys, values)

2007-01-31 Thread George Sakkis
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