Why does dict(k=4, z=2).update(dict(l=1)) return None? It seems as if it should return dict(k=4, z=2, l=1)? I\'m using Python 2.7 shou
dict(k=4, z=2).update(dict(l=1))
None
dict(k=4, z=2, l=1)
dict.update() method does update in place. It does not return the modified dict, but None.
The doc says it in first line:
Update the dictionary with the key/value pairs from other, overwriting existing keys. Return None.