Skip to content

Speed up get_tokens: use findall on capture-free regex - #140

Open
boidolr wants to merge 1 commit into
aboutcode-org:mainfrom
boidolr:main
Open

boidolr wants to merge 1 commit into
aboutcode-org:mainfrom
boidolr:main

Conversation

@boidolr

@boidolr boidolr commented Sep 25, 2026

Copy link
Copy Markdown

Replace re.split with capture groups with a plain findall on a capture-free pattern.
The alternatives are mutually exclusive so the token list is identical.

Replace re.split with capture groups with a plain findall on
a capture-free pattern.
The alternatives are mutually exclusive so the token list
is identical.

Signed-off-by: Raphael Boidol <boidolr@users.noreply.github.com>
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.

1 participant