diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-11-10 16:28:53 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-11-10 16:28:53 (GMT) |
commit | 1b2004f0599693da3add850b9e1eebc2acb07bf0 (patch) | |
tree | b52300dbdce8200ae18637efe90ed3ebd2c86c8d /Lib/sre_parse.py | |
parent | b99c132bd9030883f7a3482feb5e2b38c02f4188 (diff) | |
download | cpython-1b2004f0599693da3add850b9e1eebc2acb07bf0.zip cpython-1b2004f0599693da3add850b9e1eebc2acb07bf0.tar.gz cpython-1b2004f0599693da3add850b9e1eebc2acb07bf0.tar.bz2 |
Fixed error position for the backslash at the end of regex pattern.
Diffstat (limited to 'Lib/sre_parse.py')
-rw-r--r-- | Lib/sre_parse.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ 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): |