.format vs. %

88888 Dihedral dihedral88888 at googlemail.com
Tue Jan 3 10:47:59 EST 2012

davidfx於 2012年1月1日星期日UTC+8上午2時19分34秒寫道:
> Hello everyone,
> I just have a quick question about .format and %r %s %d.  
> Should we always be using .format() for formatting strings or %?
> Example a = 'apples'
>               print "I love {0}.".format(a)
> If I wanted to put .format into a variable, how would I do that.
> Thanks for your information in advance.
> David

This is a good evolution in Python. It is 2012 now and the text I/O part 
is not as important as 10 years ago. The next move of Python could
be easy integration of C++ libraries.

The auto code generation part for low-paid tedious   GUI tasks  is still missing
in the standard Python. 

Boa and wxpython are still not good enough. 

More information about the Python-list mailing list