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

Stefan Krah skrah at bytereef.org
Mon Sep 7 19:39:24 CEST 2015


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.


Stefan Krah 




More information about the Python-ideas mailing list