Kaydet (Commit) f0365511 authored tarafından Brett Cannon's avatar Brett Cannon

Switch to using %r in the format string.

üst e427a1ca
......@@ -98,7 +98,7 @@ class ASDLScanner(spark.GenericScanner, object):
def t_default(self, s):
r" . +"
raise ValueError, "unmatched input: %s" % repr(s)
raise ValueError, "unmatched input: %r" % s
class ASDLParser(spark.GenericParser, object):
def __init__(self):
......
......@@ -47,7 +47,7 @@ def reflow_lines(s, depth):
# XXX this should be fixed for real
if i == -1 and 'GeneratorExp' in cur:
i = size + 3
assert i != -1, "Impossible line %d to reflow: %s" % (size, repr(s))
assert i != -1, "Impossible line %d to reflow: %r" % (size, s)
lines.append(padding + cur[:i])
if len(lines) == 1:
# find new size based on brace
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment