2 ms·
`str.format` can’t be removed completely - it’s necessary if you want to build format strings at runtime. But otherwise, yes - make f-strings the “one obvious
by pansa2 6y ago
`str.format` can’t be removed completely - it’s necessary if you want to build format strings at runtime.
But otherwise, yes - make f-strings the “one obvious way to do it” and use `format` only when necessary. And get rid of the old %-formatting.
Also consider making f-strings the default: https://pyfound.blogspot.com/2020/04/all-strings-become-f-strings-python.html https://pyfound.blogspot.com/2020/04/all-strings-become-f-st...