Issue 18031: The Python Tutorial says % string formatting will be removed (original) (raw)

Created on 2013-05-22 05:58 by Carlos.Nepomuceno, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (6)
msg189791 - (view) Author: Carlos Nepomuceno (Carlos.Nepomuceno) Date: 2013-05-22 05:58
It[1] says: "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." [1] http://docs.python.org/2/tutorial/inputoutput.html#old-string-formatting
msg189795 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2013-05-22 07:42
Can you please provide some context for this report? On the abstract, I agree that there is an error in the tutorial: it is not decided whether the % formatting will be eventually removed, and I would also personally disagree with the recommendation to prefer .format.
msg189802 - (view) Author: Carlos Nepomuceno (Carlos.Nepomuceno) Date: 2013-05-22 10:01
According to what I have been told at python-list@python.org str.__mod__() is not going to be deprecated and that seems to be a myth created by Python's own documentation. I do remember to have read previously in another page that it would be deprecated but that seems to be already corrected. Today I just found it in the tutorial.
msg189826 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2013-05-22 17:26
I agree that we should not say that %-formatting will be removed from the language. Not until Python 5000, anyway.
msg189852 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-05-23 07:12
New changeset ef037ad304c1 by Raymond Hettinger in branch '2.7': Issue #18031: %-formatting isn't dead yet and might pull through. http://hg.python.org/cpython/rev/ef037ad304c1
msg189853 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-05-23 07:15
New changeset e1d6140b02f0 by Raymond Hettinger in branch '3.3': Issue #18031: %-formatting isn't dead yet and might pull through. http://hg.python.org/cpython/rev/e1d6140b02f0
History
Date User Action Args
2022-04-11 14:57:45 admin set github: 62231
2013-05-23 07:16:04 rhettinger set status: open -> closedresolution: fixed
2013-05-23 07:15:47 python-dev set messages: +
2013-05-23 07:12:45 python-dev set nosy: + python-devmessages: +
2013-05-22 17:26:55 eric.smith set nosy: + eric.smithmessages: +
2013-05-22 11:16:56 nedbat set nosy: + nedbat
2013-05-22 10:01:01 Carlos.Nepomuceno set messages: +
2013-05-22 07:42:44 loewis set nosy: + loewismessages: +
2013-05-22 06:32:10 ezio.melotti set nosy: + ezio.melottitype: enhancementversions: + Python 3.3, Python 3.4
2013-05-22 05:58:22 Carlos.Nepomuceno create