Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchakaserhiy-storchaka commentedApr 7, 2019
edited by bedevere-bot
Loading

@serhiy-storchakaserhiy-storchaka added the type-featureA feature request or enhancement labelApr 7, 2019
M=MULTILINE
S=DOTALL
X=VERBOSE
ASCII=A=sre_compile.SRE_FLAG_ASCII# assume ascii "locale"
Copy link
Contributor

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

Copy link
MemberAuthor

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.

SylvainDe reacted with thumbs up emoji
Copy link
MemberAuthor

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.

SylvainDe reacted with thumbs up emoji
else:
res=f'~{res}'
returnres
__str__=object.__str__
Copy link
Contributor

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 ?

@serhiy-storchakaserhiy-storchaka merged commit14a0e16 intopython:masterMay 31, 2019
@serhiy-storchakaserhiy-storchaka deleted the re-flags-repr branchMay 31, 2019 07:39
DinoV pushed a commit to DinoV/cpython that referenced this pull requestJan 14, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@SylvainDeSylvainDeSylvainDe left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

type-featureA feature request or enhancement

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@serhiy-storchaka@SylvainDe@the-knights-who-say-ni@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp