You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good suggestion, we definitely don't want to double suppress lpar and rpar. But I do want to auto-promote str's to Suppress, which is pretty common throughout pyparsing's API (where a str is passed in and is auto-promoted to Suppress or Literal).
Can you submit a PR where the lines are written as:
if isinstance(lpar, str):
lpar = Suppress(lpar)
if isinstance(rpar, str):
rpar = Suppress(rpar)
You could then invoke infix_notation as infix_notation(..., lpar=Literal("("), rpar=Literal(")")), and the paren characters would be retained, and not suppressed.
If I want to use
delimited_list()
WITHOUT suppression of lpar and rpar.The default value use Suppress("(")
but later in the code, the Suppress() is injected another time.
I would like to invoke
infix_notation(...,lpar="(", rpar=")")
to remove the suppression, but it's impossible.I propose to remove the lines [808-809] to fix this bug.
Why I want this?
I want to convert a source code to another source code, but after applying pyparsing. I the middle, I can inject some "macro".
The text was updated successfully, but these errors were encountered: