diff options
author | Paul McGuire <ptmcg@austin.rr.com> | 2019-07-08 06:21:54 -0500 |
---|---|---|
committer | Paul McGuire <ptmcg@austin.rr.com> | 2019-07-08 06:21:54 -0500 |
commit | e30333f5eb4262069a8863e8fa276ecbcd364660 (patch) | |
tree | 39d5fa810c8fab2caad7b62f1ecae2f2bdc582ad | |
parent | 12fe989a000bb378bb237764f2c10dad43afc57c (diff) | |
download | pyparsing-git-e30333f5eb4262069a8863e8fa276ecbcd364660.tar.gz |
Nicer looking found string if fail on backslash
-rw-r--r-- | pyparsing.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pyparsing.py b/pyparsing.py index eabfead..d41ceba 100644 --- a/pyparsing.py +++ b/pyparsing.py @@ -294,7 +294,7 @@ class ParseBaseException(Exception): if self.loc >= len(self.pstr): foundstr = ', found end of text' else: - foundstr = ', found %r' % self.pstr[self.loc:self.loc+1] + foundstr = (', found %r' % self.pstr[self.loc:self.loc+1]).replace(r'\\', '\\') else: foundstr = '' return "%s%s (at char %d), (line:%d, col:%d)" % \ |