commit | 1b2004f0599693da3add850b9e1eebc2acb07bf0 | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Mon Nov 10 18:28:53 2014 +0200 |
committer | Serhiy Storchaka <storchaka@gmail.com> | Mon Nov 10 18:28:53 2014 +0200 |
tree | b52300dbdce8200ae18637efe90ed3ebd2c86c8d | |
parent | b99c132bd9030883f7a3482feb5e2b38c02f4188 [diff] [blame] |
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 fb622ec..aa2d64b 100644 --- a/Lib/sre_parse.py +++ b/Lib/sre_parse.py
@@ -225,7 +225,8 @@ 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):