Skip to content

Allow plain Python literals in regexp function wrappers#1493

Open
renato2099 wants to merge 3 commits intoapache:mainfrom
renato2099:renato2099/1446
Open

Allow plain Python literals in regexp function wrappers#1493
renato2099 wants to merge 3 commits intoapache:mainfrom
renato2099:renato2099/1446

Conversation

@renato2099
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #1446.

Rationale for this change

Make regex functions more pythonic

What changes are included in this PR?

Changes to regex functions such that we can improve their usability by making them more pythonic

Are there any user-facing changes?

Regex functions are more pythonic now

return list(_iter(exprs))


def _to_raw_literal_expr(value: Expr | Any) -> expr_internal.Expr:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine to use internally but for the public api surface we don't want to take Any. Would be nicer to be Expr | str for example on the string functions

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.

Improve usability of regexp and other functions

2 participants