def decipher_all(decipher, objid, genno, x):
 if isinstance(x, str):
  return decipher(objid, genno, x)
 decf = (lambda v: decipher_all(decipher, objid, genno, v))
 if isinstance(x, list):
  x = [decf(v) for v in x]
 elif isinstance(x, dict):
  x = dict(((k, decf(v)) for (k, v) in x.iteritems()))
 return x

def decipher_all ( decipher , objid , genno , x ) : if isinstance ( x , str ) : return decipher ( objid , genno , x ) decf = ( lambda v : decipher_all ( decipher , objid , genno , v ) ) if isinstance ( x , list ) : x = [ decf ( v ) for v in x ] elif isinstance ( x , dict ) : x = dict ( ( ( k , decf ( v ) ) for ( k , v ) in x . iteritems ( ) ) ) return x
recursively deciphers the given object .