summaryrefslogtreecommitdiff
path: root/pyparsing.py
diff options
context:
space:
mode:
authorptmcg <ptmcg@austin.rr.com>2018-10-12 23:42:09 -0500
committerptmcg <ptmcg@austin.rr.com>2018-10-12 23:42:09 -0500
commit2fe1bb0be12e9c603bc82d3990b9305c248d99e1 (patch)
tree32dba266a616f312a357956d3975fe28bc28b9d6 /pyparsing.py
parentdc074e25459062578e9104dda3e86b662715f966 (diff)
downloadpyparsing-git-2fe1bb0be12e9c603bc82d3990b9305c248d99e1.tar.gz
Fix extra nesting level in ParseResults when defining results name in another non-Group named expression
Diffstat (limited to 'pyparsing.py')
-rw-r--r--pyparsing.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pyparsing.py b/pyparsing.py
index a4a7546..9279d34 100644
--- a/pyparsing.py
+++ b/pyparsing.py
@@ -398,7 +398,7 @@ class ParseResults(object):
toklist = [ toklist ]
if asList:
if isinstance(toklist,ParseResults):
- self[name] = _ParseResultsWithOffset(toklist.copy(),0)
+ self[name] = _ParseResultsWithOffset(ParseResults(toklist.__toklist), 0)
else:
self[name] = _ParseResultsWithOffset(ParseResults(toklist[0]),0)
self[name].__name = name