16 ms·
"Percentage: {:.2f}%".format(foobar * 100) vs "Percentage: {:.2%}".format(foobar)
by Pyppe 10y ago
"Percentage: {:.2f}%".format(foobar * 100)
vs
"Percentage: {:.2%}".format(foobar)
- hughperkins 10y agoits actually harder to read, in my opinion, since the % character is often used for formatting,eg '%s' % somevar. personally, i dislike such spammy prs. it adds nothing to my code, and its not like accepting the pr is going to attract you as a developer on my code.