8000 gh-111259: Optimize complementary character sets in RE by serhiy-storchaka · Pull Request #120742 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-111259: Optimize complementary character sets in RE #120742

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

Merged

Conversation

serhiy-storchaka
Copy link
Member
@serhiy-storchaka serhiy-storchaka commented Jun 19, 2024

Patterns like "[\s\S]" or "\s|\S" which match any character are now compiled to the same effective code as a dot with the DOTALL modifier ("(?s:.)").

Patterns like "[\s\S]" or "\s|\S" which match any character are now compiled
to the same effective code as a dot with the DOTALL modifier ("(?s:.)").
@nineteendo
Copy link
Contributor

Nice, this will speed up usage like this: ^[\s\S]*(?P<sub>[ab]).

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Jun 19, 2024
…ki5PV.rst

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) June 20, 2024 06:58
@serhiy-storchaka serhiy-storchaka merged commit 8bc76ae into python:main Jun 20, 2024
33 checks passed
mrahtz pushed a commit to mrahtz/cpython that referenced this pull request Jun 30, 2024
…H-120742)

Patterns like "[\s\S]" or "\s|\S" which match any character are now compiled
to the same effective code as a dot with the DOTALL modifier ("(?s:.)").
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
…H-120742)

Patterns like "[\s\S]" or "\s|\S" which match any character are now compiled
to the same effective code as a dot with the DOTALL modifier ("(?s:.)").
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
…H-120742)

Patterns like "[\s\S]" or "\s|\S" which match any character are now compiled
to the same effective code as a dot with the DOTALL modifier ("(?s:.)").
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.

3 participants
0