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

Fix the missing parenthesis in f-string #90

Merged
merged 1 commit into from
Aug 7, 2024
Merged

Conversation

hvox
Copy link
Contributor

@hvox hvox commented Nov 12, 2022

One of the previous commits removed the closing parenthesis inside one of f-strings. I fixed it.

jaraco referenced this pull request Jul 31, 2024
The [Python documentation](https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting) notes that using the `%` operator to format strings can lead to 'a variety of quirks that lead to a number of common errors'.

Python added f-strings in version 3.6, with PEP 498. F-strings are a flexible and powerful way to format strings. They make the code shorter and more readable, since the code now looks more like the output.

These are also performance benefits to using f-strings as they require the interpreter to only parse the string once rather than backtracking for insertions, requiring multiple parses of the string.

As this library only supports Python 3.7+, there is no compatibility concerns.
https://github.com/rspeer/ordered-set/blob/master/pyproject.toml#L24
@jaraco jaraco mentioned this pull request Jul 31, 2024
@rspeer rspeer merged commit 9669ecf into rspeer:master Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants