[Python-Dev] dict(keys, values)

Steve Holden steve at holdenweb.com
Thu Feb 1 18:27:11 CET 2007


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))

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd          http://www.holdenweb.com
Skype: holdenweb     http://del.icio.us/steve.holden
Blog of Note:          http://holdenweb.blogspot.com
See you at PyCon?         http://us.pycon.org/TX2007



More information about the Python-Dev mailing list