Feature or enhancement
Proposal:
In #86519 (PR #31137), we added new re.prefixmatch and re.Pattern.prefixmatch as explicit names for re.match and re.Pattern.match, because it's really not obvious the shorter old names include a prefix anchor; you probably meant to use search (no anchors) or fullmatch (prefix and suffix anchors).
This is essentially a soft deprecation of the match names:
- It's okay to use the old name in old code, but prefer the new name in new code.
- We don't plan on removing the old name or emitting deprecation warnings.
Let's make this explicit.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
Feature or enhancement
Proposal:
In #86519 (PR #31137), we added new
re.prefixmatchandre.Pattern.prefixmatchas explicit names forre.matchandre.Pattern.match, because it's really not obvious the shorter old names include a prefix anchor; you probably meant to usesearch(no anchors) orfullmatch(prefix and suffix anchors).This is essentially a soft deprecation of the
matchnames:Let's make this explicit.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
re.matchandre.Pattern.matchin favour ofprefixmatch#148101