I am trying to get the deepcopy of a dict and update the result in Python 2.6. The following code works well:
>>> a = {1:2}
>>> b = copy.deepcopy(a)
>>> b.update({3:4})
>>> b
{1: 2, 3: 4}
while the following code does not work
>>> a={1:2}
>>> b = copy.deepcopy(a).update({3:4})
>>> b
>>>
Why the second code snippet gives None
?