Skip to content

Wrap tokenlist in list if self.resultsName is present#324

Merged
ptmcg merged 2 commits intopyparsing:masterfrom
busunkim96:tokenlist-list
Oct 29, 2021
Merged

Wrap tokenlist in list if self.resultsName is present#324
ptmcg merged 2 commits intopyparsing:masterfrom
busunkim96:tokenlist-list

Conversation

@busunkim96
Copy link
Copy Markdown
Contributor

@busunkim96 busunkim96 commented Oct 28, 2021

There seems to have been a small behavior change to class Dict() when asdict was added. This restores the branch that was lost (self.resultsName is present).

3c495db#diff-651b49e05968bd7f42614f05b7e9d94b30f52db27eb692ce20ef87e9799c624f

@busunkim96
Copy link
Copy Markdown
Contributor Author

I am not at familiar with this library, so the commit message is a bad attempt at me trying to explain the change. 😅 If you end up using this PR please edit the title to something that makes more sense.

@ptmcg
Copy link
Copy Markdown
Member

ptmcg commented Oct 28, 2021

Looking at this now, thanks so much for doing this research!!!

@ptmcg
Copy link
Copy Markdown
Member

ptmcg commented Oct 28, 2021

Ok, I would really like to use your PR so you get your contributor credits. But the change needs to work with and without results names, and with and without asPythonDict=True. I'm testing the different permutations, and will send you a fix to correct your PR.

Comment thread pyparsing/core.py
@ptmcg ptmcg merged commit 8bbc83e into pyparsing:master Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants