app/soc/logic/dicts.py
changeset 2177 e2c193e1f631
parent 2073 6eb9b4652c80
--- a/app/soc/logic/dicts.py	Mon Apr 13 15:30:48 2009 +0000
+++ b/app/soc/logic/dicts.py	Mon Apr 13 15:31:39 2009 +0000
@@ -53,11 +53,10 @@
     recursive: Determines whether merge_subdicts is recursive
 
   Returns:
-    the target dict, with any missing values from updates merged in, in-place.
+    a new dict, with any missing values from updates merged into target
   """
 
-  if not target:
-    target = {}
+  target = target.copy() if target else {}
 
   for key, value in updates.iteritems():
     if key not in target: