Question about consistency in python language

Sam Pointon free.condiments at
Fri Sep 9 01:50:44 CEST 2005

update updates the dictionary in place - it actually returns None, not
the updated dict. However, you can construct a dictionary from a list
of (key, value) pairs using dict(list). Example:

>>>l = [('foo', 'bar'), ('baz', 'qig')]
>>>d = dict(l)
>>>print d
{'foo': 'bar', 'baz': 'qig'}

More information about the Python-list mailing list