From: Serhiy Storchaka Date: Mon, 10 Nov 2014 16:28:53 +0000 (+0200) Subject: Fixed error position for the backslash at the end of regex pattern. X-Git-Tag: v3.5.0a1~493 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1b2004f0599693da3add850b9e1eebc2acb07bf0;p=thirdparty%2FPython%2Fcpython.git Fixed error position for the backslash at the end of regex pattern. --- diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py index fb622ec2357b..aa2d64bb40c0 100644 --- a/Lib/sre_parse.py +++ b/Lib/sre_parse.py @@ -225,7 +225,8 @@ class Tokenizer: try: char += self.decoded_string[index] 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.next = char def match(self, char):