On 2/24/2012 11:41 AM, Benjamin Peterson wrote:
2012/2/24 Tshepang Lekhonkhobe<tshep...@gmail.com>:
Hi,

I was of the thought that Old String Formatting |"%s" % foo| was to be
phased out by Advanced String Formatting |"{}.format(foo)|. I however
keep seeing new code committed into the main VCS using the old style.
Is this okay? Is there a policy? I ask also because I expect CPython
to lead by example.

Using either is fine I think. It doesn't hurt anyone to have old
string formatting around for a long time.

It is a burden for some people to learn and remember the exact details of both systems and exactly how they differ. Having both in the stdlib hurts readability for such people. I would prefer that the stdlib only used {} formatting or if not that, that it only used the simple, hard-to-forget forms of % formatting (%s, %d, %f, without elaboration).

--
Terry Jan Reedy

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to