Python Forum

Full Version: i love f-strings
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i love f-strings. i'm using them all over the place, now. most of my error messages are f-strings with expanded detail about the error.
It's all I ever use for printing and/or formatting strings anymore
my scripts used to not support Python 2.X. now they don't support anything lower than 3.6.
Now you're thinking!
Press f to pay formatted respects

def f(f):
    return f

print(f'{f("f")}')
i did use format() the other day. don't remember why i needed to. but i think i could live with that function being gone.