Uh oh!
There was an error while loading. Please reload this page.
gh-86519: Update docs for prefixmatch - #148096
Merged
Merged
Conversation
prefixmatchprefixmatchhugovk
marked this pull request as draft
April 4, 2026 15:38
prefixmatchprefixmatchhugovk
marked this pull request as ready for review
April 4, 2026 16:06
hugovk
requested review from
AlexWaygood, JelleZijlstra and vsajip
as code ownersApril 4, 2026 16:06
gpshead
reviewed
Apr 4, 2026
| (2, 7) | ||
| Sometimes you'll be tempted to keep using :func:`re.match`, and just add ``.*`` | ||
| Sometimes you'll be tempted to keep using :func:`re.prefixmatch`, and just add ``.*`` |
MemberAuthor
There was a problem hiding this comment.
Hopefully the new name makes things clearer. I've removed this bit.
Uh oh!
There was an error while loading. Please reload this page.
| | | location where this RE matches. | | ||
| +------------------+-----------------------------------------------+ | ||
| | ``prefixmatch()``| Determine if the RE matches at the beginning | | ||
| | | of the string. | |
Member
There was a problem hiding this comment.
I'd at least leave a little mention of "Previously named match()" with a link to the canonical doc section explaining the renaming and soft deprecation in here.
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
hugovk
commented
Apr 4, 2026
Uh oh!
There was an error while loading. Please reload this page.
AlexWaygood
removed their request for review
April 6, 2026 21:41
hugovk
commented
Apr 14, 2026
MemberAuthor
Any further review comments? |
Uh oh!
There was an error while loading. Please reload this page.
JelleZijlstra
approved these changes
Apr 14, 2026
Uh oh!
There was an error while loading. Please reload this page.
ljfp pushed a commit
to ljfp/cpython
that referenced
this pull request
Apr 25, 2026
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
regex HOWTO:
Update
matchtoprefixmatch.And many of these examples don't specifically need to match a prefix, so let's prefer
searchfor general cases, and introduce it first.Other files:
Change to
prefixmatchwhere prefixing is important and relevant, otherwise change tosearch.📚 Documentation preview 📚: https://cpython-previews--148096.org.readthedocs.build/