mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	Adjust input pre-processing so that a comment on the last line does not
break the processor; this will do the right thing.
This commit is contained in:
		
							parent
							
								
									e70dbe0fc5
								
							
						
					
					
						commit
						00c96aeba6
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -109,7 +109,9 @@ def __init__(self, ifp, ofp, table):
 | 
				
			||||||
        self.write = ofp.write
 | 
					        self.write = ofp.write
 | 
				
			||||||
        self.ofp = ofp
 | 
					        self.ofp = ofp
 | 
				
			||||||
        self.table = table
 | 
					        self.table = table
 | 
				
			||||||
        self.line = string.join([s.rstrip() for s in ifp.readlines()], "\n")
 | 
					        L = [s.rstrip() for s in ifp.readlines()]
 | 
				
			||||||
 | 
					        L.append("")
 | 
				
			||||||
 | 
					        self.line = string.join(L, "\n")
 | 
				
			||||||
        self.preamble = 1
 | 
					        self.preamble = 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def convert(self):
 | 
					    def convert(self):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue