equal
deleted
inserted
replaced
20 __authors__ = [ |
20 __authors__ = [ |
21 '"Sverre Rabbelier" <sverre@rabbelier.nl>', |
21 '"Sverre Rabbelier" <sverre@rabbelier.nl>', |
22 ] |
22 ] |
23 |
23 |
24 |
24 |
25 def mergeDicts(target, updates): |
25 def merge(target, updates): |
26 """Like the builtin 'update' method but does not overwrite existing values |
26 """Like the builtin 'update' method but does not overwrite existing values |
27 |
27 |
28 Args: |
28 Args: |
29 target: The dictionary that is to be updated, may be None |
29 target: The dictionary that is to be updated, may be None |
30 updates: A dictionary containing new values for the original dict |
30 updates: A dictionary containing new values for the original dict |
31 |
31 |
32 Returns: the target dictionary |
32 Returns: |
|
33 the target dict, with any missing values from updates merged in, in-place |
33 """ |
34 """ |
34 |
35 |
35 if not target: |
36 if not target: |
36 target = {} |
37 target = {} |
37 |
38 |