[Python-Dev] Status regarding Old vs. Advanced String Formating (original) (raw)
Mark Lawrence breamoreboy at yahoo.co.uk
Sat Feb 25 21:16:13 CET 2012
- Previous message: [Python-Dev] Status regarding Old vs. Advanced String Formating
- Next message: [Python-Dev] Status regarding Old vs. Advanced String Formating
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 25/02/2012 13:13, Mark Lawrence wrote:
On 25/02/2012 05:55, Nick Coghlan wrote:
On Sat, Feb 25, 2012 at 10:23 AM, Mark Lawrence<breamoreboy at yahoo.co.uk> wrote:
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. I think this is daft because all of the code has to be supported for the ten years that MVL has suggested. Indeed, that note was written before we decided that getting rid of "%" formatting altogether would be a bad idea. It would be better to update it to say something like: "The formatting operations described here are modelled on C's printf() syntax. They only support formatting of certain builtin types, and the use of a binary operator means that care may be needed in order to format tuples and dictionaries correctly. As the new string formatting syntax is more powerful, flexible, extensible and handles tuples and dictionaries naturally, it is recommended for new code. However, there are no current plans to deprecate printf-style formatting." Cheers, Nick. That's fine by me, it'll save me changing my own code. I'll put this on the issue tracker if you want, but after the pressing needs of the bar and 6 Nations rugby :)
I would raise this on the issue tracker but it won't let me login. Guess I'm not wanted. :(
-- Cheers.
Mark Lawrence.
- Previous message: [Python-Dev] Status regarding Old vs. Advanced String Formating
- Next message: [Python-Dev] Status regarding Old vs. Advanced String Formating
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]