-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
gh-86519: Add prefixmatch APIs to the re module #31137
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
Open
gpshead
wants to merge
19
commits into
python:main
Choose a base branch
from
gpshead:prefixmatch-b42353
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
587dc4d
bpo-42353: Add prefixmatch APIs to the re module.
gpshead c7d1581
Merge branch 'main' into prefixmatch-b42353
gpshead fa2885e
fix editor fat finger typo during the merge. #vim
gpshead 6195ad7
3.12
gpshead 0296f29
Merge branch 'main' into prefixmatch-b42353
hauntsaninja bab8e8b
Merge main and modernize the relevant docs.
gpshead 149f6e4
Simplify, don't have duplicate definitions.
gpshead e176692
Merge main into prefixmatch-b42353
gpshead 58d8f57
Update match name removal language to be definitive
gpshead 3cd9d71
Fix re.rst examples after match to search conversion
gpshead d6090bb
Replace name-parsing examples with Monty Python references
gpshead 341972f
Address reviewer docs feedback: prefer prefixmatch throughout
gpshead cd8d85d
Statically alias match to prefixmatch instead of runtime memcpy
gpshead 74d51b3
Merge main into prefixmatch-b42353
gpshead 4abdff0
Fix whatsnew 3.15 RST heading that matches git conflict marker
gpshead 6bacfb0
docs, remove errant "if ever"
gpshead 40e6a2a
doc wording tweaks jf clarity
gpshead b3c6948
Extract do_test_match_getitem helper to preserve git blame
gpshead b277981
tweak news to match docs
gpshead File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
10 changes: 10 additions & 0 deletions
10
Misc/NEWS.d/next/Library/2022-02-05-00-15-03.bpo-42353.0ebVGG.rst
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| The :mod:`re` module gains a new :func:`re.prefixmatch` function as an | ||
| explicit spelling of what has to date always been known as :func:`re.match`. | ||
| :class:`re.Pattern` similary gains a :meth:`re.Pattern.prefixmatch` method. | ||
|
|
||
| Why? Explicit is better than implicit. Other widely used languages all use | ||
| the term "match" to mean what Python uses the term "search" for. The | ||
| unadorened "match" name in Python has been a frequent case of confusion and | ||
| coding bugs due to the inconsistency with the rest if the software industry. | ||
|
|
||
| We do not plan to deprecate and remove the older ``match`` name. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.