[Python-Dev] transitioning from % to {} formatting
Steven Bethard
steven.bethard at gmail.com
Fri Oct 2 09:12:28 CEST 2009
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. Or are you suggesting:
(1) Make API accept callables
(2) Issue warnings for regular strings
(3) Throw exceptions for regular strings
(4) Allow regular strings again, but assume {}-style formatting
?
Steve
--
Where did you get that preposterous hypothesis?
Did Steve tell you that?
--- The Hiphopopotamus
More information about the Python-Dev
mailing list