S
Steven D'Aprano
I can't believe I'm taking Rick's side here, but the docs do say:
"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."
http://docs.python.org/py3k/library/stdtypes.html#old-string-formatting- operations
I consider that a statement of deprecation, even if it doesn't use the
term explicitly or describe a definite timeline for removal.
Which is exactly why it is not deprecated: it doesn't say it is
deprecated and has no timeline for removal. It may not even be removed:
"may" go away is not "will" go away.
Going around saying that features are deprecated just because they may
(or may not) some day in the distant future become deprecated is FUD. It
simply isn't true that % formatting is deprecated: Python Dev has a
formal process for deprecating code, and that process has not been
applied to % and there are no plans to do so in the foreseeable future.
There is a huge code base using this feature, including the standard
library, and Python does not arbitrarily deprecate features used by real
code without good reason. Just because a number of Python devs want to
encourage people to use format doesn't imply that % will go away any time
before Python 4000.