Skip to content

gh-115238: graphlib remove redundant f-string #115239

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

Merged
merged 2 commits into from
Sep 1, 2024

Conversation

lukavada
Copy link
Contributor

@lukavada lukavada commented Feb 10, 2024

@ghost
Copy link

ghost commented Feb 10, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Feb 10, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

The change does not affect the runtime behavior:

>>> import dis
>>> def f1():
...     raise Exception(f'abc')
... 
>>> def f2():
...     raise Exception('abc')
... 
>>> dis.dis(f1)
  1           RESUME                   0

  2           LOAD_GLOBAL              1 (Exception + NULL)
              LOAD_CONST               1 ('abc')
              CALL                     1
              RAISE_VARARGS            1
>>> dis.dis(f2)
  1           RESUME                   0

  2           LOAD_GLOBAL              1 (Exception + NULL)
              LOAD_CONST               1 ('abc')
              CALL                     1
              RAISE_VARARGS            1

But, I think it is fine as a typo fix :)

@ericvsmith
Copy link
Member

Agreed that it doesn't matter: except for docstrings, f-strings without enclosed expressions are converted to regular strings. But the change seems fine.

@AA-Turner AA-Turner merged commit 917283a into python:main Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants