[Tutor] 2 vs 3

Mark Lawrence breamoreboy at yahoo.co.uk
Mon Sep 7 18:58:53 CEST 2015


On 07/09/2015 12:34, Steven D'Aprano wrote:
> On Mon, Sep 07, 2015 at 11:32:32AM +0200, Laura Creighton wrote:
>> In a message of Mon, 07 Sep 2015 10:16:16 +0100, Alan Gauld writes:
>>
>>> And of course if you are really moving to the v3 way of
>>> doing things you should move to using the new string
>>> formatting style.
>>
>> I don't think there is any great push to prefer the new style over
>> the old style 'just because' when you are doing simple things.
>
> If you're referring to "%s" % x versus "{}".format(x), no, there's no
> official push for format. They tried that, but the push-back from people
> who like the %s formatting was too large.
>
> %s formatting is NOT deprecated, and will not be any time in the
> forseeable future;

http://www.gossamer-threads.com/lists/python/dev/969817
http://bugs.python.org/issue14123

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence



More information about the Tutor mailing list