def get_sent_properties(request_func, propname_list):
 prop_hash = {}
 for item in propname_list:
  if isinstance(item, basestring):
   key = item
   value = request_func(item)
  elif isinstance(item, tuple):
   key = item[0]
   prop_func = item[1]
   if (len(item) <= 2):
    value = prop_func(request_func(key))
   else:
    try:
     addl_keys = map(prop_hash.get, item[2:])
     value = prop_func(*addl_keys)
    except:
     return None
  if value:
   prop_hash[key] = value
 return prop_hash

def get_sent_properties ( request_func , propname_list ) : prop_hash = { } for item in propname_list : if isinstance ( item , basestring ) : key = item value = request_func ( item ) elif isinstance ( item , tuple ) : key = item [ 0 ] prop_func = item [ 1 ] if ( len ( item ) <= 2 ) : value = prop_func ( request_func ( key ) ) else : try : addl_keys = map ( prop_hash . get , item [ 2 : ] ) value = prop_func ( * addl_keys ) except : return None if value : prop_hash [ key ] = value return prop_hash
this maps request strings to values in a hash .