.format vs. %

Andrew Berg bahamutzero8825 at gmail.com
Sat Dec 31 13:34:06 EST 2011


On 12/31/2011 12:19 PM, davidfx wrote:
> Should we always be using .format() for formatting strings or %?
In new code, yes. %-style formatting will eventually go away, but
probably not for a long time.

> If I wanted to put .format into a variable, how would I do that.
What do you mean?

-- 
CPython 3.2.2 | Windows NT 6.1.7601.17640



More information about the Python-list mailing list