Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] Status regarding Old vs. Advanced String Formating

Brian Curtinbrian 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 docshttp://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 infuture 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 theten years that MVL has suggested.  I suggest a plan that says somethinglike:->> 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 tryingto spark ideas from the core developers and users who are in a far bettersituation 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-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp