[Python-Dev] transitioning from % to {} formatting (original) (raw)

James Y Knight foom at fuhm.net
Sat Oct 3 08:36:38 CEST 2009


On Oct 2, 2009, at 2:56 PM, Raymond Hettinger wrote:

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.

Well, I actually think it was a pretty bad idea to introduce {}
formatting, because %-formatting is well-known in many other
languages, and $-formatting is used by basically all the rest. So the
introduction of {}-formatting has always seemed silly to me, and I
wish it had not happened.

HOWEVER, much worse than having a new, different, and strange
formatting convention is having multiple formatting conventions
arbitrarily used in different places within the language, with no
rhyme or reason.

So, given that brace-formatting was added, and that it's been declared
the way forward, I'd greatly prefer it taking over everywhere in
python, instead of having to use a mixture.

James



More information about the Python-Dev mailing list