Skip to content

Using f-strings in your examples #1

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

Open
pvergain opened this issue Sep 17, 2019 · 0 comments
Open

Using f-strings in your examples #1

pvergain opened this issue Sep 17, 2019 · 0 comments

Comments

@pvergain
Copy link

pvergain commented Sep 17, 2019

Hi,

I think, you should use the f-strings for your examples:

for example:

print('{} - {}'.format(name,
...           instruments[name]))

should be written

print(f"{name} - {instruments[name]}")

or better with Python 3.8 (f-strings now support '=', see https://bugs.python.org/issue36817)

print(f"{name=} - {instruments[name]=}")

Thanks for your work. Have a nice day !

f-strings pointers

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

No branches or pull requests

1 participant