Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f036551

Browse files
committed
Switch to using %r in the format string.
1 parent e427a1c commit f036551

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Parser/asdl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def t_whitespace(self, s):
9898

9999
def t_default(self, s):
100100
r" . +"
101-
raise ValueError, "unmatched input: %s" % repr(s)
101+
raise ValueError, "unmatched input: %r" % s
102102

103103
class ASDLParser(spark.GenericParser, object):
104104
def __init__(self):

Parser/asdl_c.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def reflow_lines(s, depth):
4747
# XXX this should be fixed for real
4848
if i == -1 and 'GeneratorExp' in cur:
4949
i = size + 3
50-
assert i != -1, "Impossible line %d to reflow: %s" % (size, repr(s))
50+
assert i != -1, "Impossible line %d to reflow: %r" % (size, s)
5151
lines.append(padding + cur[:i])
5252
if len(lines) == 1:
5353
# find new size based on brace

0 commit comments

Comments
 (0)