Recursively deciphers the given object.
(decipher, objid, genno, x)
| 76 | return x |
| 77 | |
| 78 | def decipher_all(decipher, objid, genno, x): |
| 79 | """Recursively deciphers the given object. |
| 80 | """ |
| 81 | if isinstance(x, str): |
| 82 | return decipher(objid, genno, x) |
| 83 | if isinstance(x, list): |
| 84 | x = [ decipher_all(decipher, objid, genno, v) for v in x ] |
| 85 | elif isinstance(x, dict): |
| 86 | for (k,v) in x.iteritems(): |
| 87 | x[k] = decipher_all(decipher, objid, genno, v) |
| 88 | return x |
| 89 | |
| 90 | # Type cheking |
| 91 | def int_value(x): |