Re:Python’s tug of war between beginner-friendly and advance...
by woodruffw on Thursday February 04, 2021 @08:58PM
(#26032181)
> Can we make that the standard and get rid of the ugly str.format(UGLINESS) syntax.
`format` is still useful, particularly when working with pre-templatized strings. It's also a (relatively) new feature; Python 2 didn't have it at all.
OTOH, I wouldn't cry if Python 3.X finally removed %-formatting. `format` does everything that `%` does, with a much nicer API (especially in 3.7+).
`format` is still useful, particularly when working with pre-templatized strings. It's also a (relatively) new feature; Python 2 didn't have it at all.
OTOH, I wouldn't cry if Python 3.X finally removed %-formatting. `format` does everything that `%` does, with a much nicer API (especially in 3.7+).