| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| (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 ``.*`` |
There was a problem hiding this comment.
is this temptation true any longer?
Sorry, something went wrong.
There was a problem hiding this comment.
Hopefully the new name makes things clearer. I've removed this bit.
Sorry, something went wrong.
| | | location where this RE matches. | | ||
| +------------------+-----------------------------------------------+ | ||
| | ``prefixmatch()``| Determine if the RE matches at the beginning | | ||
| | | of the string. | |
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.
Sorry, something went wrong.
There was a problem hiding this comment.
Added.
Sorry, something went wrong.
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
|
Any further review comments? |
Sorry, something went wrong.
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
regex HOWTO:
Update match to prefixmatch.
And many of these examples don't specifically need to match a prefix, so let's prefer search for general cases, and introduce it first.
Other files:
Change to prefixmatch where prefixing is important and relevant, otherwise change to search.
📚 Documentation preview 📚: https://cpython-previews--148096.org.readthedocs.build/