-
-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dict(asdict=True) with items created/modified with parse action can't be nested in Each #432
Comments
Of the 4 |
@ptmcg, any news? Looks that my issue can be easily fixed with .add_parse_action(…, call_during_try = True) So, it's again a documentation/misunderstanding problem. |
Basil,
Thanks for the time and effort in your thorough testing (where were you when I was doing the 3.0.0 pre releases??!!). I’ve been thinking about some of these, and you are right, I may just change the documentation to reflect the current behavior. That said, there *is* an odd bug that it looks like I introduced last October that breaks some uses of transform_string, which is a pretty major deal. Also annoying that my tests didn’t catch it. (You can see it if you run the cuneiform_python.py example.)
However, I have some personal/family business that will completely occupy my time until mid next week, I will try to look into your reports if I can steal some time. So please bear with me. And thanks again for submitting all this feedback, it just makes pyparsing better.
…-- Paul
From: Basil Peace ***@***.***>
Sent: Tuesday, July 19, 2022 6:33 PM
To: pyparsing/pyparsing ***@***.***>
Cc: Paul McGuire ***@***.***>; Mention ***@***.***>
Subject: Re: [pyparsing/pyparsing] Dict(asdict=True) with items created/modified with parse action can't be nested in Each (Issue #432)
@ptmcg <https://github.com/ptmcg> , any news?
Looks that my issue can be easily fixed with
.add_parse_action(…, call_during_try = True)
So, it's again a documentation/misunderstanding problem.
—
Reply to this email directly, view it on GitHub <#432 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAC5XAZFYEPB7NKYL4WM6MDVU43LVANCNFSM53226XGQ> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AAC5XA46UHUDNKCQFWUDWDDVU43LVA5CNFSM53226XG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOI3UJVLI.gif> Message ID: ***@***.*** ***@***.***> >
|
Basil - And here it is November, much further than just "mid next week". Working on a book (with hard deadlines) was more intense than I expected. I have been holding off the next release of pyparsing because of this open item. I may actually have to break some current behavior, and if I do that, I'll probably not do that in the 3.0.x versions, but release as a 3.1.0, and probably do some early release candidates too. Thanks for your patience! |
The last case gives the error:
So, the problem occurs with
asdict=True
only. And only insideEach
(or maybe other containers that calltry_parse
).Debugging shows that case # 2 actually has the same behavior/problem. So, the depth of nesting doesn't matter. It's just that
'1'
is hashable, so it doesn't crash.Is there any reason why
try_parse
should callpostParse
at all?The text was updated successfully, but these errors were encountered: