summaryrefslogtreecommitdiff
path: root/pyparsing/core.py
diff options
context:
space:
mode:
authorptmcg <ptmcg@austin.rr.com>2021-10-29 00:04:02 -0500
committerptmcg <ptmcg@austin.rr.com>2021-10-29 00:04:02 -0500
commitae447cd7d3d816e2dfa2fc0e60a5e2002b3733da (patch)
treedbcd0fdf11da8f5ff11c86cc254e233c70676cb8 /pyparsing/core.py
parent8bbc83e50ec9ca488c984466ecf8e242060916e1 (diff)
downloadpyparsing-git-ae447cd7d3d816e2dfa2fc0e60a5e2002b3733da.tar.gz
Fix Dict() bugfix to wrap tokenlist.as_dict() if self.resultsName
Diffstat (limited to 'pyparsing/core.py')
-rw-r--r--pyparsing/core.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pyparsing/core.py b/pyparsing/core.py
index c815468..3c27457 100644
--- a/pyparsing/core.py
+++ b/pyparsing/core.py
@@ -5414,7 +5414,7 @@ class Dict(TokenConverter):
tokenlist[ikey] = _ParseResultsWithOffset(dictvalue[0], i)
if self._asPythonDict:
- return tokenlist.as_dict()
+ return [tokenlist.as_dict()] if self.resultsName else tokenlist.as_dict()
else:
return [tokenlist] if self.resultsName else tokenlist