diff options
author | Max Fischer <maxfischer2781@gmail.com> | 2021-06-20 17:03:58 +0200 |
---|---|---|
committer | Max Fischer <maxfischer2781@gmail.com> | 2021-06-20 17:03:58 +0200 |
commit | fa33732bdef08da61ff7e01a013eb00f81fe7d89 (patch) | |
tree | c49f2b7e53437848fb3093a7e946a596ba23c123 | |
parent | 351beb7f9e6f2ef7f4f8c4765945e11a5bc279df (diff) | |
download | pyparsing-git-fa33732bdef08da61ff7e01a013eb00f81fe7d89.tar.gz |
memo cache only provides copies
-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 07d0b6e..e2efe8a 100644 --- a/pyparsing/core.py +++ b/pyparsing/core.py @@ -4443,7 +4443,7 @@ class Forward(ParseElementEnhance): prev_loc, prev_result = memo[self] if isinstance(prev_result, Exception): raise prev_result - return prev_loc, prev_result + return prev_loc, prev_result.copy() except KeyError: # we are searching for the best result – keep on improving prev_loc, prev_result = memo[self] = loc, ParseException( |