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

adodbapi: Remove redundant str and repr calls, preferring !r formatting marker #2276

Merged

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Jun 1, 2024

Adodbapi version of #2272

As title says:

  • prefer more succint {!r} over repr
  • avoid unnecessary calls to str() and repr()

Expecting a few slight behaviour changes: " vs ' in some strings where it should not matter, especially in traces, logs, debugging, tests, etc.

Copy link
Collaborator

@vernondcole vernondcole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love what this does to readability. Much of this code was written before F strings were invented, and the difference is remarkable.

@Avasam Avasam merged commit ad5779b into mhammond:main Jun 1, 2024
27 checks passed
@Avasam Avasam deleted the adodbapi-repr-marker-and-redundant-str-coercion branch June 1, 2024 19:18
clin1234 pushed a commit to clin1234/pywin32 that referenced this pull request Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants