[Python-ideas] Deprecating rarely used str methods

Vito De Tullio vito.detullio at gmail.com
Fri Aug 9 20:44:50 CEST 2013


Bruce Leban wrote:

>>     print('|%-20s|%8s|' % (name, value))
>>     print('|{:<20}|{:>8}|'.format(name, value))
>>
>> which are shorter and cleaner.

[than .ljust, .rjust, .center, .zfill...]

> In what universe are those cleaner?

I found the .format mini language confusing, but the '%'-style it's 
definitely clearer to me.


-- 
By ZeD



More information about the Python-ideas mailing list