diff options
author | ptmcg <ptmcg@austin.rr.com> | 2023-03-06 23:28:15 -0600 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2023-03-06 23:28:15 -0600 |
commit | 28e4abe1c394e52c39b0dd00537e8312eb2cd9ae (patch) | |
tree | 8f13cc87202869b6d390bd45a8895786cf0fa356 /pyparsing/core.py | |
parent | 5d95272d98b8bce1ac53b10bdef6db12b0230dfa (diff) | |
download | pyparsing-git-28e4abe1c394e52c39b0dd00537e8312eb2cd9ae.tar.gz |
Add ParseResults.deepcopy() - fixes #463
Diffstat (limited to 'pyparsing/core.py')
-rw-r--r-- | pyparsing/core.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pyparsing/core.py b/pyparsing/core.py index 9fbb6d0..71c2690 100644 --- a/pyparsing/core.py +++ b/pyparsing/core.py @@ -4147,7 +4147,7 @@ class Or(ParseExpression): raise max_fatal if maxException is not None: - maxException.msg = self.errmsg + # maxException.msg = self.errmsg raise maxException else: raise ParseException( @@ -4260,7 +4260,8 @@ class MatchFirst(ParseExpression): maxExcLoc = len(instring) if maxException is not None: - maxException.msg = self.errmsg + if maxException.msg == self.exprs[0].errmsg: + maxException.msg = self.errmsg raise maxException else: raise ParseException( |