[Python-Dev] Status regarding Old vs. Advanced String Formating
Brian Curtin
brian at python.org
Sat Feb 25 03:05:33 CET 2012
On Feb 24, 2012 6:26 PM, "Mark Lawrence" <breamoreboy at yahoo.co.uk> wrote:
>> On 24/02/2012 21:37, "Martin v. Löwis" wrote:
>>>>>> I was of the thought that Old String Formatting |"%s" % foo| was to be
>>> phased out by Advanced String Formatting |"{}.format(foo)|.
>>>>>> This is actually not the case, and never was. Some people would indeed
>> like to see that happen, and others are strongly opposed.
>>>> As a consequence, both APIs for formatting will coexist for a long time
>> to come (ten years at least); no deprecation is planned.
>>>> Regards,
>> Martin
>>> <quote>
> Quoting the docs http://docs.python.org/py3k/library/stdtypes.html
>> 4.6.2. Old String Formatting Operations
>> Note
>> The formatting operations described here are obsolete and may go away in
future versions of Python. Use the new String Formatting in new code.
>> </quote>
>> I think this is daft because all of the code has to be supported for the
ten years that MVL has suggested. I suggest a plan that says something
like:-
>> Until Python 3.5 both methods of string formatting will be supported.
> In Python 3.6 the the old formating style will be deprecated.
> In Python 3.7 the old style is dead.
>> I'm fully aware that it isn't likely to be that easy, I'm simply trying
to spark ideas from the core developers and users who are in a far better
situation to judge this situation than I am.
-infinity. We can't do that as outlined earlier in the thread.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120224/8740ab3e/attachment.html>
More information about the Python-Dev
mailing list