Skip to content

Using f-strings in your examples #1

Open
@pvergain

Description

@pvergain

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions