Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
bpo-36548: Improve the repr of re flags.#12715
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| M=MULTILINE | ||
| S=DOTALL | ||
| X=VERBOSE | ||
| ASCII=A=sre_compile.SRE_FLAG_ASCII# assume ascii "locale" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Not related to the issue you are solving (but as you're updating this code anyway):
- the alignment may be more aesthetically pleasing if the one latter variable was the first here
- PEP8 recommends using at least 2 whitespace before the inline comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
In case of aliases the canonical name is the one that is defined first. We want to use long names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Some lines are already too long, and using two spaces will make them even longer.
| else: | ||
| res=f'~{res}' | ||
| returnres | ||
| __str__=object.__str__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
As you're adding this line, would it be worth adding a few test cases for it ?
Uh oh!
There was an error while loading.Please reload this page.
https://bugs.python.org/issue36548