mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	Switch to using %r in the format string.
This commit is contained in:
		
							parent
							
								
									e427a1ca3a
								
							
						
					
					
						commit
						f0365511a5
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -98,7 +98,7 @@ class ASDLScanner(spark.GenericScanner, object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def t_default(self, s):
 | 
					    def t_default(self, s):
 | 
				
			||||||
        r" . +"
 | 
					        r" . +"
 | 
				
			||||||
        raise ValueError, "unmatched input: %s" % repr(s)
 | 
					        raise ValueError, "unmatched input: %r" % s
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ASDLParser(spark.GenericParser, object):
 | 
					class ASDLParser(spark.GenericParser, object):
 | 
				
			||||||
    def __init__(self):
 | 
					    def __init__(self):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -47,7 +47,7 @@ def reflow_lines(s, depth):
 | 
				
			||||||
        # XXX this should be fixed for real
 | 
					        # XXX this should be fixed for real
 | 
				
			||||||
        if i == -1 and 'GeneratorExp' in cur:
 | 
					        if i == -1 and 'GeneratorExp' in cur:
 | 
				
			||||||
            i = size + 3
 | 
					            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])
 | 
					        lines.append(padding + cur[:i])
 | 
				
			||||||
        if len(lines) == 1:
 | 
					        if len(lines) == 1:
 | 
				
			||||||
            # find new size based on brace
 | 
					            # find new size based on brace
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue