From 50ce0d77bc041a0d0a60f0dd50de79815088069a Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Wed, 14 Aug 2013 12:26:05 -0400 Subject: unrpyc/decompiler.py --- unrpyc/decompiler.py | 6 +++--- 1 file 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) -- cgit v1.2.3-70-g09d2