[Python-ideas] One way to do format and print
Stefan Krah
skrah at bytereef.org
Wed Sep 9 18:35:46 CEST 2015
Sven R. Kunze <srkunze at ...> writes:
> I still don't understand what's wrong with deprecating %, but okay. I
> think f-strings will push {} to wide-range adoption.
Then it will probably be hard to explain, so I'll be direct:
1) Many Python users are fed up with churn and don't want to do yet
another rewrite of their applications (just after migrating to
3.x).
2) Despite many years of officially preferring {}-formatting in
the docs (and on Stackoverflow), people *still* use %-formatting.
This should be a clue that they actually like it.
3) %-formatting often has better performance and is often
easier to read.
4) Yes, in other cases {}-formatting is easier to read. So choose
whatever is best.
Stefan Krah
More information about the Python-ideas
mailing list