Myth Busters: % "this old style of formatting will eventually be removed from the language"

Ethan Furman ethan at stoneleaf.us
Tue May 21 22:37:32 EDT 2013


On 05/21/2013 07:26 PM, Carlos Nepomuceno wrote:
> I was looking for something else and just found what I think is the place where I was first exposed to the myth[1]:
>
> "Since str.format() is quite new, a lot of Python code still uses the % operator. However, because this old style of formatting will eventually be removed from the language, str.format() should generally be used."
>
> Is this tutorial outdated or this still an issue?

It was exuberant wishful thinking.  ;)

While .format() does have its uses, % is in wide-spread use even among the core-devs.  It's not going away any time soon.

--
~Ethan~



More information about the Python-list mailing list