diff options
author | Max Fischer <maxfischer2781@gmail.com> | 2021-06-26 16:00:32 +0200 |
---|---|---|
committer | Max Fischer <maxfischer2781@gmail.com> | 2021-06-26 16:00:32 +0200 |
commit | 0b3f1ca8da75b10efa19b1b1a8e6f5b73d08df28 (patch) | |
tree | 9cd783bc344d9bfddbd3bbfc372ee89ef98ab97f | |
parent | c925b307abdd7d8a97e884faaaf9dc9791c7296c (diff) | |
download | pyparsing-git-0b3f1ca8da75b10efa19b1b1a8e6f5b73d08df28.tar.gz |
LR memo content is always returned as copy
-rw-r--r-- | pyparsing/core.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pyparsing/core.py b/pyparsing/core.py index eba349a..1f8780e 100644 --- a/pyparsing/core.py +++ b/pyparsing/core.py @@ -4476,7 +4476,7 @@ class Forward(ParseElementEnhance): new_loc, new_result = prev_loc, prev_result # the match did not get better: we are done if new_loc <= prev_loc: - return prev_loc, prev_result + return prev_loc, prev_result.copy() # the match did get better: see if we can improve further else: prev_loc, prev_result = memo[key] = new_loc, new_result |