[Python-Dev] converting the stdlib to str.format (original) (raw)

Henning von Bargen henning.vonbargen at arcor.de
Wed Jun 4 21:37:22 CEST 2008


Please, please, please: Keep the % formatting!

In 99% of the Python code I have seen, the str.format wouldn't gain any advantage (not even regarding the code readability).

Yes, there may be special cases where str.format offers more flexibility, but until now I never missed anything in the % formatting.

One thing to keep in mind: What if you have a lot of %-format strings translated and stored them inside a database, for example? If % would be deprecated, these database entries would have to be converted, so you would have to write yet another program to do this.

So if the % formating really is going to vanish, then please not before April 2099 (or when Duke Nukem Forever will be released ;-).

Just my 0,02 EUR

Henning



More information about the Python-Dev mailing list