app/soc/logic/dicts.py
changeset 719 2e635755713a
parent 499 d22e4fe8e64b
child 721 6f1d29857072
--- a/app/soc/logic/dicts.py	Thu Dec 11 04:23:42 2008 +0000
+++ b/app/soc/logic/dicts.py	Thu Dec 11 20:53:57 2008 +0000
@@ -89,6 +89,18 @@
 
   return result
 
+
+def unzip(target, order):
+  """Constructs a list from target in the order specified by order
+
+  Args:
+    target: the dictionary to pull the values from
+    order: the order of the keys
+  """
+
+  return (target[key] for key in order)
+
+
 def rename(target, keys):
   """Returns a dict containing only the key/value pairs from keys.