[Python-Dev] transitioning from % to {} formatting

Raymond Hettinger python at rcn.com
Fri Oct 2 20:56:54 CEST 2009


[Steven Bethard]
>. Just saying "ok, switch your format strings
> from % to {}" didn't work in Python 3.0 for various good reasons, and
> I can't imagine it will work in Python 4.0 unless we have a transition
> plan.

Do the users get any say in this?
I imagine that some people are heavily invested in %-formatting.

Because there has been limited uptake on {}-formatting (afaict),
we still have limited experience with knowing that it is actually
better, less error-prone, easier to learn/rember, etc.   Outside
a handful of people on this list, I have yet to see anyone adopt
it as the preferred syntax. 

Raymond




More information about the Python-Dev mailing list