diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2013-08-14 12:26:05 -0400 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2013-08-14 12:26:05 -0400 |
commit | 50ce0d77bc041a0d0a60f0dd50de79815088069a (patch) | |
tree | e8ce26af0d98f37d687f060db2dce501734345bf /unrpyc | |
parent | 15ced8b5fbfe2a8a4c1662fbaa789b3273b4e4c8 (diff) | |
download | html5ks-50ce0d77bc041a0d0a60f0dd50de79815088069a.tar.xz html5ks-50ce0d77bc041a0d0a60f0dd50de79815088069a.zip |
unrpyc/decompiler.py
Diffstat (limited to 'unrpyc')
-rw-r--r-- | unrpyc/decompiler.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unrpyc/decompiler.py b/unrpyc/decompiler.py index 06e758c..d25fa21 100644 --- a/unrpyc/decompiler.py +++ b/unrpyc/decompiler.py @@ -289,13 +289,13 @@ class PrintRenPython(python_ast.NodeVisitor): return self.quote(python_ast.dump(node)) def visit_Num(self, node): - return str(node.n) + return json.dumps(node.n) def visit_Name(self, node): - return self.quote(node.id) + return json.dumps(node.id) def visit_Str(self, node): - return self.quote(escape_string(node.s)) + return json.dumps(node.s) def visit_keyword(self, node): return self.visit(node.value) |