mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	Fixed error position for the backslash at the end of regex pattern.
This commit is contained in:
		
							parent
							
								
									b99c132bd9
								
							
						
					
					
						commit
						1b2004f059
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -225,7 +225,8 @@ def __next(self): | ||||||
|             try: |             try: | ||||||
|                 char += self.decoded_string[index] |                 char += self.decoded_string[index] | ||||||
|             except IndexError: |             except IndexError: | ||||||
|                 raise self.error("bogus escape (end of line)") from None |                 raise error("bogus escape (end of line)", | ||||||
|  |                             self.string, len(self.string) - 1) from None | ||||||
|         self.index = index + 1 |         self.index = index + 1 | ||||||
|         self.next = char |         self.next = char | ||||||
|     def match(self, char): |     def match(self, char): | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Serhiy Storchaka
						Serhiy Storchaka