[Python-ideas] One way to do format and print

Ryan Gonzalez rymg19 at gmail.com
Tue Sep 8 00:39:26 CEST 2015

On September 7, 2015 3:52:52 PM CDT, Random832 <random832 at fastmail.com> wrote:
>Chris Angelico <rosuav at gmail.com> writes:
>> ... and this is the other. Being available for non-literals means
>> can be used with i18n, string tables, and other transformations.
>> Percent formatting is similar to what other C-derived languages have,
>> and .format() has certain flexibilities, so neither is likely to be
>> deprecated any time soon.
>I've never understood why .format was invented in the first place,
>rather than extending percent-formatting to have the features that it
>has over it.

t = (1, 2, 3)
# 400 lines later...
print '%s' % t # oops!

>Python-ideas mailing list
>Python-ideas at python.org
>Code of Conduct: http://python.org/psf/codeofconduct/

Sent from my Nexus 5 with K-9 Mail. Please excuse my brevity.

More information about the Python-ideas mailing list