[pypy-commit] pypy py3.5: Better way to fix the double quotes
raffael_t
pypy.commits at gmail.com
Mon Jun 13 15:22:14 EDT 2016
Author: Raffael Tfirst <raffael.tfirst at gmail.com>
Branch: py3.5
Changeset: r85144:caaa5d28bdd6
Date: 2016-06-13 21:21 +0200
http://bitbucket.org/pypy/pypy/changeset/caaa5d28bdd6/
Log: Better way to fix the double quotes
diff --git a/pypy/interpreter/astcompiler/tools/asdl_py.py b/pypy/interpreter/astcompiler/tools/asdl_py.py
--- a/pypy/interpreter/astcompiler/tools/asdl_py.py
+++ b/pypy/interpreter/astcompiler/tools/asdl_py.py
@@ -102,7 +102,7 @@
self.emit("raise oefmt(space.w_TypeError,", 2)
self.emit(" \"Expected %s node, got %%T\", w_node)" % (base,), 2)
self.emit("State.ast_type(%r, 'AST', None, %s)" %
- (base, [repr(attr.name)[1:-1] for attr in sum.attributes]))
+ (base, [attr.name for attr in sum.attributes]))
self.emit("")
for cons in sum.types:
self.visit(cons, base, sum.attributes)
@@ -119,7 +119,7 @@
self.emit("")
self.make_converters(product.fields, name)
self.emit("State.ast_type(%r, 'AST', %s)" %
- (name, [repr(f.name)[1:-1] for f in product.fields]))
+ (name, [f.name for f in product.fields]))
self.emit("")
def get_value_converter(self, field, value):
@@ -263,7 +263,7 @@
self.make_mutate_over(cons, cons.name)
self.make_converters(cons.fields, cons.name, extra_attributes)
self.emit("State.ast_type(%r, '%s', %s)" %
- (cons.name, base, [repr(f.name)[1:-1] for f in cons.fields]))
+ (cons.name, base, [f.name for f in cons.fields]))
self.emit("")
def visitField(self, field):
More information about the pypy-commit
mailing list