Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #45736

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

From Denis McMahon <denismfmcmahon@gmail.com>
Newsgroups comp.lang.python
Subject Re: Myth Busters: % "this old style of formatting will eventually be removed from the language"
Date 2013-05-22 14:24 +0000
Organization A noiseless patient Spider
Message-ID <knike3$v6m$2@dont-email.me> (permalink)
References <BLU176-W25D89313A094EE7C675E0DD7A90@phx.gbl> <mailman.1949.1369193229.3114.python-list@python.org>

Show all headers | View raw


On Tue, 21 May 2013 23:26:58 -0400, Ned Batchelder wrote:

> On 5/21/2013 10:26 PM, Carlos Nepomuceno wrote:

>> "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?

> That tutorial is out of date.  %-formatting isn't being removed.

Indeed, removing %-formatting could break a substantial amount of live 
code, with potentially significant maintenance effort in the user 
community simply to make existing code work with the new interpreter. The 
effect of this on corporations using python code translates into 
"business risk", and the next step is "we can avoid the business risk by 
migrating our python scripts to some other language."

For the designers and maintainers of any language to arbitrarily[1] (in 
the eyes of the user base) remove a widely used feature that would have a 
major effect on the user base could kill off a language, simply because 
many users will not want to take the risk of it happening again, even if 
they can easily automate the upgrade from removed obsolete language 
feature to new shiny language feature.

[1] Some portion of the user base will always consider any such change 
that causes them headaches and additional effort as having been 
arbitrary, no matter how well the language designers and maintainers 
explain the need to break the old scripts.

-- 
Denis McMahon, denismfmcmahon@gmail.com

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Myth Busters: % "this old style of formatting will eventually be removed from the language" Ned Batchelder <ned@nedbatchelder.com> - 2013-05-21 23:26 -0400
  Re: Myth Busters: % "this old style of formatting will eventually be removed from the language" Denis McMahon <denismfmcmahon@gmail.com> - 2013-05-22 14:24 +0000
    Re: Myth Busters: % "this old style of formatting will eventually be removed from the language" Terry Jan Reedy <tjreedy@udel.edu> - 2013-05-22 15:40 -0400

csiph-web