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

Sven R. Kunze srkunze at mail.de
Mon Sep 7 20:57:44 CEST 2015


On 07.09.2015 19:39, Stefan Krah wrote:
> Sven R. Kunze <srkunze at ...> writes:
>>>        print("Hello, I am %s. My favorite number is %s." % (b, a))
>>>
>>> ... and this is the other. Being available for non-literals means they
>>> can be used with i18n, string tables, and other transformations.
>>> Percent formatting is similar to what other C-derived languages have,
>> Still necessary? Really, really necessary? Or just because we can?
>>
> Absolutely. For many Python users this is the preferred form. I find
> that of all variations, this one is the most readable.

Okay, convinced. ;)

No, seriously, what would you do when Python would deprecate % syntax? 
Could you switch to {} ?

Best,
Sven


More information about the Python-ideas mailing list