[Python-Dev] transitioning from % to {} formatting

Terry Reedy tjreedy at udel.edu
Sat Oct 3 03:39:11 CEST 2009


Steven Bethard wrote:
> On Thu, Oct 1, 2009 at 10:49 PM, Terry Reedy <tjreedy at udel.edu> wrote:
>> As someone who likes .format() and who already uses such bound methods to
>> print, such as in
>>
>> emsg = "...".format
>> ...
>>   if c: print(emsg(arg, barg))
>>
>> I find this **MUCH** preferable to the ugly and seemingly unnecessary
>> wrapper class idea being bandied about. This would be scarcely worse than
>> passing the string itself.
> 
> But it's not much of a transition plan.

It is a 'plan' to transition from not being able to use the new 
formatting, which I prefer, throughout the stdlib, to being able to do so.

I believe most, even if not all, find that acceptable. Certainly, I 
think you should be able to implement the above for argparse before 
submitting it. And I would hope that 3.2, in a year, is generally 
.format usable.

This is the first step in a possible long-term replacement, but there is 
currently no consensus to do any more than this. So I think it premature 
to do any more. I would agree, for instance, that an auto-translation 
tool is needed.

Terry Jan Reedy



More information about the Python-Dev mailing list