app/soc/logic/dicts.py
changeset 744 cd9bf163473c
parent 721 6f1d29857072
child 900 0b416bb14970
equal deleted inserted replaced
743:e6ab5b0c2fda 744:cd9bf163473c
    89 
    89 
    90   return result
    90   return result
    91 
    91 
    92 
    92 
    93 def unzip(target, order):
    93 def unzip(target, order):
    94   """Constructs a list from target in the order specified by order
    94   """Constructs a list from target in the order specified by order.
    95 
    95 
    96   Args:
    96   Args:
    97     target: the dictionary to pull the values from
    97     target: the dictionary to pull the values from
    98     order: the order of the keys
    98     order: the order of the keys
    99   """
    99   """
   121 
   121 
   122   return result
   122   return result
   123 
   123 
   124 
   124 
   125 def split(target):
   125 def split(target):
   126   """Takes a dictionary and splits it into single-valued dicts
   126   """Takes a dictionary and splits it into single-valued dicts.
   127 
   127 
   128   If there are any values in target that are a list it is split up
   128   If there are any values in target that are a list it is split up
   129   into a new dictionary instead.
   129   into a new dictionary instead.
   130 
   130 
   131   >>> split({})
   131   >>> split({})