Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

gh-133306: Support \z as a synonym for \Z in regular expressions#133314

Merged
serhiy-storchaka merged 5 commits intopython:mainfrom
serhiy-storchaka:re-z
May 3, 2025
Merged

gh-133306: Support \z as a synonym for \Z in regular expressions#133314
serhiy-storchaka merged 5 commits intopython:mainfrom
serhiy-storchaka:re-z

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchakaserhiy-storchaka commentedMay 2, 2025
edited by github-actionsbot
Loading

Copy link
Contributor

@sethmlarsonsethmlarson left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Serhiy. I only had one thought on this PR:

r"\W": (IN, [(CATEGORY, CATEGORY_NOT_WORD)]),
r"\Z": (AT, AT_END_STRING), # end of string
r"\z": (AT, AT_END_STRING), # end of string
r"\Z": (AT, AT_END_STRING), # end of string (deprecated)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use "deprecated" language here if we're not deprecating\Z?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

What words do you suggest? "legacy"? "obsolete"?

Due to its subtle difference from other common implementations, it is very likely that\Z will be deprecated and removed in future, when it will be safe. It is kept for compatibility with older Python versions.

Copy link
Member

@hugovkhugovk left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! Please also run the buildbots before merge.

serhiy-storchakaand others added2 commitsMay 3, 2025 10:10
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@serhiy-storchaka
Copy link
MemberAuthor

Thank you for review. This feature is not platform-depended, so no need to spend the time and the resources on running the buildbots.

Copy link
Member

@vstinnervstinner left a comment

Choose a reason for hiding this comment

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

LGTM

@serhiy-storchakaserhiy-storchakaenabled auto-merge (squash)May 3, 2025 07:30
@serhiy-storchakaserhiy-storchaka merged commitac56f8c intopython:mainMay 3, 2025
39 checks passed
@serhiy-storchakaserhiy-storchaka deleted the re-z branchMay 3, 2025 09:41
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull requestJul 12, 2025
pythonGH-133314)\Z was an error inherited from PCRE 0.95. It was fixed in PCRE 2.0.In other engines, \Z means not “anchor at string end”, but“anchor before optional newline at string end”.\z means “anchor at string end” in most RE engines.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@vstinnervstinnervstinner approved these changes

@hugovkhugovkhugovk approved these changes

@sethmlarsonsethmlarsonsethmlarson approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@serhiy-storchaka@vstinner@hugovk@sethmlarson

[8]ページ先頭

©2009-2026 Movatter.jp