Skip to content
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

Pull flags out of regular expressions #1053

Merged
merged 1 commit into from Dec 29, 2016

Conversation

singingwolfboy
Copy link
Contributor

In Python, you can pass flags to regular expressions. There are two ways to do so: by passing the flag as a flag argument to whatever regex function you're using, or by embedding the flag in the regex itself. If the flag is embedded in the regex, it is ambiguous unless it is at the start of the expression, and in Python 3.6 this is now deprecated.

This pull request pulls all flags out of regexes and passes them via the flag argument, instead. This is clearer and more consistent.

@davidism davidism merged commit 423a356 into pallets:master Dec 29, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants